0
我有本地机器上的虚拟主机,我有htaccess打开。问题是如果我有一个htaccess文件在那里下载页面而不是显示。这是我的虚拟主机。与htaccess的麻烦
<VirtualHost 127.0.0.1:80>
DocumentRoot "/Library/WebServer/Documents/test
<Directory "/Library/WebServer/Documents/test">
AllowOverride All
</Directory>
ServerName local.test.com
</VirtualHost>
这里是我的htaccess
SetEnv APPLICATION_ENV development
AddType application/x-httpd-php .php .htm .html
AddHandler x-httpd-php .php .htm .html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
我敢肯定,问题是htaccess的。如果我重命名它,页面加载正常。
什么页面? PHP的? HTML? –
index.php。但我认为问题在于AddHandler是错误的。不要特别需要它,所以没什么大不了的。我需要获取该环境变量。 – smokingoyster