symfony2 on shared hosting
.htaccess, mod-rewrite, shared-hosting, symfony
Solution
One way would be setting `assets_base_urls` in `app/config.yml` e.g
framework:
#..
templating:
engines: ['twig']
assets_base_urls: http://your.site.com/web/
Problem
I've been working on this for quite a while to no avail.. I've got symfony installed on a shared web-host where I have zero access to change the DocumentRoot to the web/ folder so that is not an option to me... I've written my htaccess ``` RewriteEngine On RewriteBase / RewriteRule ^$ web/app.php [QSA] RewriteRule ^(.*)$ web/app.php/$1 [QSA, L] ``` I have also tried this with `RewriteBase web/` and `RewriteBase /web/` to no avail. With this, symfony is working.. I can login, I can do all of that... Only problem is, none of the assets are displaying... Chrome Developer Tools, is telling me it's finding a 404 which is right because it's not reading the /web/ folder as the DocumentRoot.. So, how to fix this issue without re-writing files, or anything.. There's got to be a way to do this with .htaccess only...