.htaccess未重定向页面

.htaccess未重定向页面,.htaccess,mod-rewrite,redirect,.htaccess,Mod Rewrite,Redirect,我想重定向特定的页面URL,并在.htaccess中使用以下不起作用的URL Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule /antalya_apartment.php?bid=2&page=13 /antalya_apartment.php?bid=4&page=0 [R=301,L] RewriteRule /antalya_apartment.php?bid=3&page=

我想重定向特定的页面URL,并在.htaccess中使用以下不起作用的URL

Options +FollowSymLinks 
RewriteEngine on 
RewriteBase / 
RewriteRule /antalya_apartment.php?bid=2&page=13 /antalya_apartment.php?bid=4&page=0 [R=301,L]
RewriteRule /antalya_apartment.php?bid=3&page=113 /antalya_apartment.php?bid=4&page=0 [R=301,L]
RewriteRule /antalya_apartment.php?bid=5&page=105 /antalya_apartment.php?bid=4&page=0 [R=301,L]
RewriteRule /antalya_apartment.php?bid=6&page=160 /antalya_apartment.php?bid=4&page=0 [R=301,L]
RewriteRule /antalya_apartment.php?bid=7&page=87 /antalya_apartment.php?bid=4&page=0 [R=301,L]
RewriteRule /antalya_apartment.php?bid=8&page=68 /antalya_apartment.php?bid=4&page=0 [R=301,L]

我还想给出一个404来重写rule/antalya_plant.php?bid=2&page=13,然后重定向到/antalya_plant.php?bid=4&page=0确保在您的服务器中启用了Apache的mod_rewrite模块!我知道mod_rewrite是启用的,因为它可以重写cond%{HTTP_HOST}^www\。重写规则^.*${HTTP_HOST}/$1[R=301,L]