1
这里是我的问题:URL重写一个子域
我想从一个子域重定向用户,同时提供以前的文件。例如,我要一个用户访问他们的帐户:
- 文件位于:
holonet.example.com/account/
- 我希望用户的URL指向(显示):
account.example.com/
又如:
- 文件是:
holonet.example.com/account/user/reset
- URL点(显示器):
account.example.com/user/reset
我一直在试图一对夫妇的.htaccess方式,但他们没有工作。这是我最新的尝试:(在publc_html的.htaccess):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(holonet\.)?thearmyoflight\.com$ [NC]
RewriteRule ^(.*)$ /account/$1 [L]
我又试图下面,因为以前没有工作 -
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/holonet/account/
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.thearmyoflight\.com$ [NC]
RewriteRule ^(.*)$ /holonet/account/%1/$1 [L]