: .htaccess Redirect 301 in Wordpress – From Post to Page By default, Wordpress posts are added to RSS feed. For my website, I want to include Wordpress pages to RSS feed. I know that some
By default, Wordpress posts are added to RSS feed. For my website, I want to include Wordpress pages to RSS feed. I know that some plugins could help me. Instead, I try to use redirect 301 in .htacccess file.
My question is, will this way work fine for Google and other search engines?
Here’s what I did:
Published a new page and then a new post with the same title, desc, keywords and content (though I know that if there’s redirect 301 Google won’t "read" the post but switch to the page)
Added the line Redirect 301 etc. to my .htacccess file
Now my post is listed in RSS feed, and when you click on it you’re redirected to the page
More posts by @Jessie594
2 Comments
Sorted by latest first Latest Oldest Best
Have a look at this WordPress plugin. It should get the job done easily and efficiently.
It's just a redirect. Search engines should follow it fine, but really the question is why?
This is a ridiculous, and convoluted, way to do whatever it is you're trying to accomplish. Pages don't go into feeds by default because feeds are generally assumed to be for a rolling list of recently-added content and pages are generally assumed to be outside of that process. Eventually–probably soon–you're going to add enough posts that all this junk you've done serves no purpose because the entry with the redirect has fallen out of the feed anyway.
Just use one of the available plugins. If you don't want to, then again: why? You need to justify why you're willing to go through these contortions to avoid doing what is clearly simpler and just plain correct. If you've got some otherwise-arbitrary prejudice against plugins, then take this one, remove the <?php ?> lines, which leaves you with ~50 lines of code. Dump that into your theme's functions.php file and like magic it's not a plugin anymore.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.