Does anyone know exactly what happens when you change your Zend site at, say, foo.com/ to foo.com/subfolder/ ? I notice that routing breaks and either I am not using front_controller.setBaseUrl() properly or it has no effect. I am unable to find any formal documentation at the Zend site about this issue.
Does anyone know exactly what happens when you change your Zend site at, say,
Share
The most likely cause of your problem is that you need to set the
RewriteBaseparameter in your.htaccessfile.Assuming your rewrite rules look something like this:
And assuming you are moving your site into the
subfoldersubfolder, add the following line to your re-write rules, just underRewriteEngine on.Your complete rewrite rules should look like so:
PS: The Front Controller/Request Object/Router will 99% of the time correctly determine the
baseUrlautomagically. Try not explicitly setting it. If the above changes to your rewrite rules do not work, only then attempt to override.You can, at any time get the
baseUrlthat was determined be the request with the following: