This is a discussion on Dropping Query String on Redirect within the Apache Web Server forums, part of the Web Server and Related Forums category; I have the following in my .htaccess RewriteCond %{QUERY_STRING} ^rss=1$ RewriteRule ^(.*)$ http://feeds.feedburner.com/Ruminate/rss [R,L] ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have the following in my .htaccess
RewriteCond %{QUERY_STRING} ^rss=1$ RewriteRule ^(.*)$ http://feeds.feedburner.com/Ruminate/rss [R,L] RewriteCond %{QUERY_STRING} ^atom=1$ RewriteRule ^(.*)$ http://feeds.feedburner.com/Ruminate/atom [R,L] It works, in that it redirects from mysite.com/?rss=1 to http://feeds.feedburner.com/Ruminate/rss?rss=1 But I'd like it NOT to append that query string and just redirect to: http://feeds.feedburner.com/Ruminate/rss (that seems like what it should do anyway)... so what's the fix? |
|
|||
|
Chris Lott wrote:
> I have the following in my .htaccess [...] > But I'd like it NOT to append that query string and just redirect to: > http://feeds.feedburner.com/Ruminate/rss > > (that seems like what it should do anyway)... so what's the fix? Add a question mark RewriteCond %{QUERY_STRING} ^rss=1$ RewriteRule ^(.*) http://feeds.feedburner.com/Ruminate/rss? [R,L] RewriteCond %{QUERY_STRING} ^atom=1$ RewriteRule ^(.*) http://feeds.feedburner.com/Ruminate/atom? [R,L] Consider also a 301 redirect instead of a 302. -- Robert |