Hi i have created one folder having three symfony application , then i have set the documentroot to that directory.
so when i access application i can see the url having web/app.php
The problem with this setup is that a whole bunch of files that aren’t meant to be publicly accessible suddenly are. I think a better option is to point the documentroot elsewhere, maybe the standard /var/www, and use Alias to bring in each symfony app.
Alias /app1 /path/to/app1/web
<Directory "/path/to/app1/web">
AllowOverride All
Allow from All
</Directory>
# And so on for app2, app3
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/app.php [L]
</IfModule>
Ahh. Well then, that means your htaccess is fine – the URL is being forwarded to the Symfony app – but something is wrong in the app itself. Maybe the routing, maybe you forgot to load your bundle… something like that.