I have a ZendFramework project that I would like to run inside a subdirectory.
Currently my document root is at /var/www and the project is at /var/www/project with the various folders (controllers, public, etc.) all within the project directory.
I am trying to make it so that all requests from http://webserver/project/* are being passed to the /var/www/project/public/index.php file. However, trying to use the following code in /var/www/project/.htaccess to pass all requests does not work:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /project/public/index.php [NC,L]
There is also an .htaccess
file in /var/www/project/public that contains exactly the same code, but when loading the /project URL I am just presented with a directory index of the project contents.