简体   繁体   English

通过htaccess将joomla 1.5 RSS feed重定向到新的onw

[英]Redirect joomla 1.5 RSS feeds to new onw via htaccess

I would like to redirect old joomla 1.5 RSS Feeds to new ones via htaccess. 我想通过htaccess将旧的joomla 1.5 RSS源重定向到新的。 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 例如,我有一个旧的URL: http://www.mydomain.tld/en/categories/debian.feed?type = atom,并希望将其重定向到: http://www.mydomain.tld/en/?format = feed&type = rss

I tried it with the following htaccess rule, but it didn´t work: 我使用以下htaccess规则进行了尝试,但没有成功:

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? 有人知道我的规则有什么问题吗?或者有一个适合我的规则?

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]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM