我有一个域AAA.us,我想指向BBB.com/subfolder(不重定向) 所以如果我去了AAA。 us/index.html?r = 5,我确实看到BBB.com/subfolder/index.html?r=5下的内容,但网址仍然是AAA.us/index.html?r=5?使用像NameCheap这样的公司如何将域名指向另一个托管公司的子文件夹
我现在已经设置了一种AAA.us纪录BBB.com点,然后htaccess的重定向改写为AAA.us任何东西(见下文)
这是最好的办法还是有更好的方法?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.AAA.us$
RewriteCond %{REQUEST_URI} !^/sites/AAA/
RewriteRule ^(.*)$ /sites/AAA/$1
RewriteCond %{HTTP_HOST} ^AAA.us$
RewriteCond %{REQUEST_URI} !^/sites/AAA/
RewriteRule ^(.*)$ /sites/AAA/$1
哦,由于某些原因,这不适用于子域名。 – 2012-02-07 22:39:20