My Symfony application is stored on PHPNet (don't if it's quite common for non-french developers). Although everything in php scripts work rather well (except classic PEBCAK), but it's not the only web app on the server.
As we do not have bought any domain name yet, the application is accessible from a phpnet subdomain (such as p1234.phpnet.org). Plus, it's not the only application on this subdomain, so they are accessible from p1234.phpnet.org/abc or p1234.phpnet.org/123.
Of course, on Symfony, you access the web folder and then app.php or app_dev.php. Finally, the url looks like p1234.phpnet.org/abc/web/.
My .htaccess (which seems to be the default one when you install a Symfony application), rewrite links from p1234.phpnet.org/abc/app_dev.php/bundles/test/img.png to p1234.phpnet.org/abc/bundles/test/img.png. So on app_dev, everything works fine.
But, as my htaccess is written in order to redirect /app.php to /, I can't get the normal links with this configuration.
DirectoryIndex app.php
Options FollowSymlinks
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/app.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /app.php/
</IfModule>
</IfModule>
If someone has an idea to refactor my file so I can have the url for the images correct, that would be great !