views:

136

answers:

1

I am trying to redirect a single URL in a .htaccess file with Redirect:

Redirect 301 /index2.php?option=com_rss&feed=RSS2.0&no_html=1 /something/somethingelse/

I have a bunch of other similar rules which work using directory structure URLs, but this one refuses to get processed.

Redirect 301 /old/url/ /new/url/

Do I have to do anything special?

Thanks!

+1  A: 

With Redirect you can only test for URL paths, or more specifically, URL path prefixes but not for the URL query. But you can do so with mod_rewrite:

RewriteEngine on
RewriteCond %{QUERY_STRING} =option=com_rss&feed=RSS2.0&no_html=1
RewriteRule ^index2\.php$ /something/somethingelse/? [L,R=301]
Gumbo
Thanks! Perfect!
Dan