旧网址: example.com?archive&id=1133352540&start_from&subaction=showfull&ucat=2
我想将它重定向到: example.com/blog/post/
我在我的 .htaccess 中尝试了各种条件,似乎没有任何效果。
最佳答案
你可以使用这个规则:
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^archive&id=1133352540&start_from&subaction=showfull&ucat=2$ [NC]
RewriteRule ^ blog/post? [L,R=301]
关于apache - 将 301 从带有问号的 URL 重定向到新的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25610630/