Forum Moderators: phranque

Message Too Old, No Replies

RSS Feed rewrite on change of Blogging platform

         

confuscius

3:42 pm on Apr 6, 2008 (gmt 0)

10+ Year Member



I need some help! I have exhausted my knowledge, gone round in circles and am now bald!

I recently replaced the blog on a site with a Wordpress 2.5 installation. Anyways, I am getting lots of 404 errors from RSS feed fetchers trying to find the old RSS feeds - rather than let the 404s continue then I thought it would be handy to redirect the requests to the new wordpress feed - so I have many old RSS feed requests that I simply want to 301 redirect to the new base feed.

Before request location examples :

/rss.php?news=10&links=10
/rss.php?news=10&links=20
etc

New request location:

/feed/

- the /feed/ is of course then rewritten by Wordpress.

I can rewrite BUT the '?news=10&links=20' gets carried over to give me :

/feed/?news=10&links=20

so how do I lose the query string?

Thanks in advance.

Paul

jdMorgan

4:45 pm on Apr 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I assume you're using mod_rewrite.

If so, then add a "?" to the end of the substitution URL. As documented, this replaces the current query string with a blank one. The "?" will not appear in the rewritten URL.

Jim