开发者

mod_rewrite local redirect on hostname

开发者 https://www.devze.com 2023-01-18 01:08 出处:网络
wonder if you can help me, I\'ve got a hosting account (on GoDaddy for my sins) which has one domain name associated with it and a few more parked.

wonder if you can help me,

I've got a hosting account (on GoDaddy for my sins) which has one domain name associated with it and a few more parked.

If I visit:

site1.com site2.com site3.com

I get the contents of /httpdocs/

I want to redirect to a sub directory (locally) only so that if you goto site2.com, the URL stays as site2.com but the content is loaded fr开发者_如何学运维om /httpdocs/site2.com/.

How can I acheive that?


RewriteCond %{HTTP_HOST} site2.com
RewriteCond %{REQUEST_URI} !^/site2.com
RewriteRule ^(.*)$ site2.com/$1 [L]
0

精彩评论

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