我不想在不影响其余重定向的情况下重定向独立查询字符串URL。
我使用了下面的代码,但它不起作用。
Redirect 301 /contact/index.php?main_page=index&cPath=7/ https://www.abc.xyz/contact-us.php
Redirect 301 /contact/index.php?main_page=index&cPath=7 https://www.abc.xyz/contact-us.php我还使用了下面的301重定向,但它是重定向到abc.xyz/page/2
Redirect 301 /tag/metal-roof/page/2/ https://www.abc.xyz/solar-power.php
Redirect 301 /tag/metal-roof/page/2 https://www.abc.xyz/solar-power.php
Redirect 301 /tag/metal-roof/ https://www.abc.xyz/
Redirect 301 /tag/metal-roof https://www.abc.xyz/发布于 2020-05-20 19:59:35
使用下面的代码,至少我能够重定向到该页面,但不能删除查询字符串。
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^contact\/index\.php$ "https\:\/\/www\.abc\.xyz\/contact\-us\.php" [R=301,L]重定向后的URL如下所示:
https://www.abc.xyz/contact-us.php?main_page=index&cPath=7https://stackoverflow.com/questions/61910837
复制相似问题