我使用 htaccess 中的以下代码重定向新闻:
RewriteCond %{REQUEST_URI} news-detail\.html
RewriteCond %{QUERY_STRING} L=0 [NC]
RewriteCond %{QUERY_STRING} (tx_news_pi1\[news\]=101|tx_news_pi1%5Bnews%5D=101) [NC]
RewriteRule ^.*$ http://example.net/news/news-detail/8/2016/newstitle? [R=301,L]
重定向有效。是否可以在 RewriteRule 中使用来自 QUERY_STRING 的参数?这样每篇新闻文章都会自动重定向到演讲网址。我尝试使用配置文件中的一些参数,但它不起作用。