I have a virtual host on my local machine that I have htaccess turned on for. The problem is if I have an htaccess file in there the page downloads instead of showing. Here’s my vhost.
<VirtualHost 127.0.0.1:80>
DocumentRoot "/Library/WebServer/Documents/test
<Directory "/Library/WebServer/Documents/test">
AllowOverride All
</Directory>
ServerName local.test.com
</VirtualHost>
Here’s my 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]
I’m sure the problem is the htaccess. If I rename it, the page loads fine.
Actually, just figured it out. It was this line.
I removed it and it’s fine. I still can’t get the environment variable to print.
Thoughts on that?