I am having a problem with my project assets when deploying them in a shared hosting. The point is that on my development server, I can create virtual host without any problems but in the shared hosting I have not this possibility when more I can create a subdomain and point it to the web project folder.
In my local server I created a virtual host and pointing to /var/www/html/tanane
and I access trough URL as tanane
(ServerName) but in a shared hosting but this varies a bit and the content of the project is inside a subfolder in the root path, for example: /public_html/tanane
and I reach it from the URLtanane.com/tanane/web/
. Apparently this is causing a issue and assets are lost and many fail to load, mostly those with sources like Twitter Bootstrap and FontAwesome. I have tried everything as you can see in this post but I have not accomplished anything yet.
This is what I did til now:
Try this syntax
{{ asset('/bundles/css/somecss.css') }}
works for some but others not, example.Problem: The CSS rule
.contactenos, .contactenos:hover, .e-shop, .e-shop:hover, .faq, .faq:hover, .fctjur, .fctjur:hover, .fctnat, .fctnat:hover, .vendidos, .vendidos:hover { background: url(/bundles/template/images/sprites.png) no-repeat; }
works fine on local server but in shared hosting I need to change to:
.contactenos, .contactenos:hover, .e-shop, .e-shop:hover, .faq, .faq:hover, .fctjur, .fctjur:hover, .fctnat, .fctnat:hover, .vendidos, .vendidos:hover { background: url(/tanane/web/bundles/template/images/sprites.png) no-repeat; }
Which not works at local server then.
- As the post I leave shows, I tried a lot of things with Assetic without success. Can anyone suggest me something else? Perhaps something in
.htaccess
or some other place? Any help, advice?
- As the post I leave shows, I tried a lot of things with Assetic without success. Can anyone suggest me something else? Perhaps something in