I installed Symfony2 on a shared server, the problem is that I can't view the images that I call in my template.
My pictures are in ~/myApplication/web/images directory.
I tried these methods in my twig template:
<img src="{{ asset('images/t.png') }}" alt="Twitter"/>
<img src="{{ asset('web/images/t.png') }}" alt="Twitter"/>
<img src="http://domain.fr/web/{{ asset('images/t.png') }}" alt="Twitter"/>
<img src="http://domain.fr/web/images/t.png" alt="Twitter"/>
But each time it is transcribed by http://domain.fr/web/images/t.png
then I would have http://domain.fr/web/images/t.png
.
I think it's a .htaccess problem but I don't what...
My .htaccess to the root of the Application:
SetEnv SHORT_OPEN_TAGS 0
SetEnv REGISTER_GLOBALS 0
SetEnv MAGIC_QUOTES 0
SetEnv SESSION_AUTOSTART 0
SetEnv ZEND_OPTIMIZER 1
SetEnv PHP_VER 5_3
AddType x-mapp-php5 .php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ web/app.php [QSA,L]
</IfModule>
Someone may have an idea of what this is?
I have no problem with CSS or JS files because I added this to my config:
framework:
templating:
assets_base_urls: http://domain.fr/web/
Thanks for your help