Mobile app version of vmapp.org
Login or Join
Jessie594

: .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

@Jessie594

Posted in: #301Redirect #Rss #Wordpress

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

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

2 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

Have a look at this WordPress plugin. It should get the job done easily and efficiently.

10% popularity Vote Up Vote Down


 

@Angie530

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme