我刚刚在家用电脑上安装了ubuntu作为双启动。Apache不加载htaccess,但仍然重写
我有以下路径htaccess的:
/var/www/html/cortana/html/.htaccess
我使用的是标准的Apache服务器版本现在2.4
我的Zend框架的项目坐落在:
/var/www/html/cortana/html/index.php
我们通过浏览器中的http://localhost/cortana/html/index.php
访问它。
这是我目前的.htaccess
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
现在,当我去index.php
并键入<?php echo getenv('APPLICATION_ENV');die()?>
我没有得到任何回应
而且,这里是错误日志:
[Thu Jan 21 03:00:06.542376 2016] [authz_core:error] [pid 5262] [client 127.0.0.1:52981] AH01630: client denied by server configuration: /var/www/html/cortana/html/.htaccess
然而,它实际上是使用mod重写模块,因为它的处理应用程序中的重定向。另外,如果我完全删除项目HTML目录中的htaccess它仍然有效
我认为这可能是一个Apache配置问题,因为使用/var/www/html
根路径中的项目。
任何帮助,为什么它不使用随机提供的htaccess的该项目,将不胜感激
不要把网站放入网站。你只会遇到可能的配置问题和其他.htaccess的影响。 –
@CharlotteDunois你能举一个例子来说明怎么做? – jkushner
@CharlotteDunois我添加了错误日志 – jkushner