Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 .htaccess 重定向以下请求:
http://www.oldwebsite.com/?feed=rss2
到我的新网站:
http://www.newwebsite.com/feed/
有什么简单的方法可以做到这一点吗?
您需要QUERY_STRING在 Condition 中捕获:
QUERY_STRING
RewriteCond %{QUERY_STRING} ^feed= RewriteRule .+ http://www.newwebsite.com/feed [R=301,L]