我有一个名为sub.domain2.com子域,我想指出domain1.com/folder~~V /
I have a subdomain called sub.domain2.com which I want to point to domain1.com/folder/
我已经建立了一个A记录指向sub.domain2.com到domain1.com和重写规则,以点子域的子目录:
I have set up an A record to point sub.domain2.com to domain1.com and a rewrite rule to the point the subdomain to the subdirectory:
RewriteCond %{HTTP_HOST} sub.domain2.com$
RewriteRule (.*) http://sub.domain2.com/folder/$1 [L]
不过,我不希望子目录/文件夹/显示了它当前的网址是什么?
However I don't want the subdirectory /folder/ showing in the URL which it currently is?
谢谢 亚历克斯
删除的http://.../
,因为这会迫使外部重定向
remove http://.../
because it will force external redirect.
RewriteCond %{HTTP_HOST} sub.domain2.com$
RewriteRule (.*) /folder/$1 [L]