我想实现让子域指向子文件夹,例如 http://{subdomain}.example.com
指向http://example.com/{subdomain}
而不更改地址栏中的URL。htaccess重写子域到子文件夹
我现在有这样的代码:
RewriteEngine on
RewriteBase/
RewriteCond %{HTTP_HOST} ^(.*)\.example\.com
RewriteRule ^(.*)$ http://example.com/%1 [L]
这似乎是工作,但它改变了我的地址栏藏汉
我knnow有关于这个问题多,但没有装我awnser。
这解决了我的问题,谢谢。 – Derp 2014-11-25 12:38:40