开发者

RewriteRule at htaccess wrong redirect

开发者 https://www.devze.com 2023-04-04 23:24 出处:网络
ive this rulesat htaccess RewriteEngine On RewriteCond %{HTTP_HOST} ^site.com [NC] RewriteRule ^(.*)$ http://www.site.com/$1 [L,R开发者_如何学C=301]

ive this rules at htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.com [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [L,R开发者_如何学C=301]
RewriteCond %{QUERY_STRING}  ^$
RewriteRule ^warcraft$  www.site.com/forumdisplay.php?f=480 [R=301,NE,NC,L]

issue happend when redirect warcraft its redirect to

http://www.site.com/home/site/public_html/www.site.com/forumdisplay.php?f=480

any tip ?


I suppose you want to redirect it to http://www.site.com/forumdisplay.php?f=480
If so put it in your .htaccess file:

RewriteCond %{QUERY_STRING}  ^$
RewriteRule ^warcraft$  http://www.site.com/forumdisplay.php?f=480 [R=301,NE,NC,L]


You must provide the full URL including protocol in your rule, in this case http://www.site.com/.....

0

精彩评论

暂无评论...
验证码 换一张
取 消