Reputation: 1
I need to put one zend project in a subdirectory of my root server. I want my project in: "http://blog.com/site" and not in "http://blog.com". Trying to do it, I`ve added in file: /application/configs/application.ini the line below:
resources.frontController.baseUrl = "http://blog.com/site"
but when I access "http://blog.com/site" it returns this error:
Invalid controller specified (site)
If I put in bootstrap the line below:
$fc = Zend_Controller_Front::getInstance();
echo $fc->getBaseUrl();
it writes "http://blog.com/site"
How can I do the subdiretory "/site" do not be consider a controller? because I want it as a part of url.
Upvotes: 0
Views: 1033
Reputation: 6449
Add RewriteBase to your .htaccess
<IfModule mod_rewrite.c>
RewriteBase /site
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
Upvotes: 3