【发布时间】:2017-05-17 00:06:03
【问题描述】:
我有一个域名
http://www.example.biz/
我开发了一个站点并将代码放在该域的子文件夹中,例如,该站点位于
http://www.example.biz/site
现在,我想将我的主域指向这个文件夹,这样当用户访问 example.biz 时,他实际上会看到 example.biz/site,为此,我在 .htaccess 中添加了以下行
RedirectMatch ^/$ /site/
效果很好,但是用户看到的网址是
http://www.example.biz/site
我不希望这样,我希望用户只看到 http://www.example.biz 作为 URL,但这个域应该不可见地指向子文件夹。我该怎么做?
【问题讨论】:
标签: .htaccess redirect subdomain