I am starting a Zend application and I need to put it in a sub folder like this:
- /subfolder
- application
- public ...
I did the following:
- I set the base url in application.ini:
resources.frontController.baseUrl = "/subfolder"
- I moved the .htaccess from the public folder directly into /subfolder, while changing the htaccess as follows:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ public/index.php [NC,L]
That's all I did. And everything works as expected. I can add controller blog with action view and can access it by calling:
/subfolder/blog/view
the url view helper and stuff work right too. The only thing that does not work is the default controller. So when I enter:
/subolder/
I get 403 (forbidden). If I enter
/subfolder/index
...it works. What am I missing?!
Thanks in advance! teebee