【问题标题】:Change base directory更改基本目录
【发布时间】:2016-01-07 09:51:13
【问题描述】:

我想将我网站的主目录更改为网站内的子目录之一,例如

http://name_of_site/first_directory/second_directory/index.php

将被重写为

http://name_of_site/index.php

【问题讨论】:

  • 使用它的代码是什么?这取决于你如何使用它......你的框架是什么等等......?

标签: configuration webserver


【解决方案1】:

基本上你需要的是分别改变你的DocumentRoot(Apache)或root(Nginx)

DocumentRoot /path/to/first_directory/second_directory;
root /path/to/first_directory/second_directory;

还有很多类似的问题

【讨论】:

    猜你喜欢
    • 2011-09-28
    • 1970-01-01
    • 1970-01-01
    • 2022-11-24
    • 1970-01-01
    • 1970-01-01
    • 2018-07-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多