Reputation: 2658
I would like to redirect old joomla 1.5 RSS Feeds to new ones via htaccess. For example I have an old URL: http://www.mydomain.tld/en/categories/debian.feed?type=atom and wish to redirect it to: http://www.mydomain.tld/en/?format=feed&type=rss
I tried it with the following htaccess rule, but it didn´t work:
RewriteRule ^de/categories/([a-z]+)\.feed?type=atom$ http://www.mydomain.tld/en/?format=feed&type=rss [R=301,L]
RewriteRule ^en/categories/([a-z]+)\.feed?type=atom$ http://www.mydomain.tld/en/?format=feed&type=rss [R=301,L]
did anybody know whats wrong with my rule, or did have a working one for me?
Upvotes: 1
Views: 591
Reputation: 16018
I think the query string is your problem - you can't match on that with a rewrite rule. Try something like:
RewriteCond %{QUERY_STRING} ^type=atom$
RewriteRule ^de/categories/([a-z]+)\.feed$ http://www.mydomain.tld/en/?format=feed&type=rss [R=301,L]
Upvotes: 1