In symfony 1.4 in settings.yml we are using the option:
env: request: param: relative_url_root: /name-of-app to specify which relative_url_root an app uses. So every app runs under a different relative_url_root.
The problem is that symfony 1.4 routing does not detect this relative url root. So for example if we have the following route:
route_name: url: /some-module/some-action param: { module: somemodule, action: someaction } And we try to access http://myproject.local/name-of-app/some-module/some-action symfony tries to search for a route name which matches name-of-app/some-module/some-action instead of /some-module/some-action.
Also symfony now tries link to images using this relative_url_root, therefore images are not found anymore. Because images are only reachable via http://project.local/img/.. instead of http://project.local/name-of-app/img
What is the best way to solve this?
- Should I remove a '/' somewhere?
- Should I use RewriteBase somehow in htaccess?
- Should I strip 'name-of-app' in the REQUEST_URI using htaccess?
- Prefix every routing url with name-of-app/?
- Should I in someway tell apache that /name-of-app is some kind of path or prefix? Note that in our production environment we are not able to create virtual hosts so we have to solve this using .htaccess or symfony itself.
- A very different solution.