【发布时间】:2009-11-14 19:49:09
【问题描述】:
我想将我所有的网站文件(甚至包括 index.php)移动到一个子目录中(对于 exp:“abc”)
例如 之前:
public_html
index.php
a.file
directory
an.other.file
...
之后:
public_html
abc_directory
index.php
a.file
directory
an.other.file
...
我希望一切都像以前一样工作,但我不想进行任何重定向(可见)。
人们应该输入“http://myexmaplesite.com/directory/an.other.file/”并通过 .htaccess apache 为他们提供“http://myexmaplesite.com/abc_directory/directory/an.other.file/”但没有外部重定向(301,302 等)
如何使用 mod_rewrite 将所有请求路由到子目录?
【问题讨论】: