【发布时间】:2014-06-22 07:47:48
【问题描述】:
我想将我的文档根目录从 public_html 移动到 public_html/new_version/。我使用 .htaccess 完成此操作
RewriteRule ^$ new_version/ [L]
RewriteRule (.*) new_version/$1 [L]
它工作正常,但我的 CakePHP 应用程序中的链接出现了:domain.com/new_version/the-link-is-shown-here/
我想完全更改文档根目录,或者让链接显示时没有“/new_version/”文件夹名称。
【问题讨论】:
-
I want to either change completely the document root- 你为什么不这样做,让你的 apache 主机指向whatever/app/new_version而不是whatever。 -
@AD7six 这绝对是最好的选择。但是“public_html”暗示了 CPanel 和可能的共享主机 :) 在这种情况下,他将无法更改文档根目录。
标签: cakephp