zend resources.frontController.baseUrl don`t work

1k Views Asked by At

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.

1

There are 1 best solutions below

0
On

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>