3

我需要将一个子目录设置为 DocumentRoot 以在 slim 框架上运行我的应用程序。有没有办法做到这一点?

我尝试使用 htaccess 文件但没有成功:root:

RewriteEngine On
RewriteRule ^$ www/ [L]
RewriteRule (.*) www/$1 [L]

子目录:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
4

1 回答 1

4

.ccconfig.yaml只需在您的应用程序根目录中创建一个。

内容应该是

BaseConfig:
    WebContent: /www
    AdminEmail: [email]

那应该行得通。如果需要,您也可以在此文件中定义自己的 PHP-config-settings。

于 2012-11-10T09:01:10.263 回答