.htaccess 使用查询重写URL不起作用,为什么?

gcuhipw9  于 2022-11-25  发布在  其他
关注(0)|答案(1)|浏览(180)

我要重定向以下URL:

https://domain.de/cms/front_content.php?idcat=650&lang=1 to https://otherdomain.de/preview.html

我编写了htaccess规则:

RewriteCond %{QUERY_STRING} ^idcat=650&lang=1$ [NC]
RewriteRule ^cms/front_content\.php$ https://otherdomain.de/preview.html? [R,L]

它对我不起作用,为什么?它是一个CMS,两个域都在里面。

4xrmg8kj

4xrmg8kj1#

之前有两个不同的规则。重新定位后,上面的重定向工作正常!@感谢julp

相关问题