开发者

RewriteCond all domains white www

开发者 https://www.devze.com 2022-12-14 00:14 出处:网络
if i have a domain www.domain1.com and www.domain2.com on same folder, how can i get the the www.(domain.com) go to domain.com?

if i have a domain www.domain1.com and www.domain2.com on same folder, how can i get the the www.(domain.com) go to domain.com?

hob sombardy can help me :)

my ownd idé is

RewriteCond %{HTTP_HOST} www.%{HTTP开发者_运维知识库_HOST}
RewriteRule (.*) http://%{HTTP_HOST}/$1 [R=301,L]

but i don't know about it will work.


Try this:

RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule (.*) http://%1/$1 [R=301,L]
0

精彩评论

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

关注公众号