Im deploying a symfony2 app on production server.
Im working on the web/.htaccess file and I can not get it "redirect" to app.php.
My actual file is:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
# Explicitly disable rewriting for front controllers
RewriteRule ^app_dev.php - [L]
RewriteRule ^app.php - [L]
RewriteCond %{REQUEST_FILENAME} !-f
# Change below before deploying to production
#RewriteRule ^(.*)$ /app.php [QSA,L]
RewriteRule ^(.*)$ /app_dev.php [QSA,L]
If I copy this file on production server (/web folder) it redirects to dev version. But if I change the comments of two last lines:
RewriteRule ^(.*)$ /app.php [QSA,L]
#RewriteRule ^(.*)$ /app_dev.php [QSA,L]
I got a 500 internal server error.
Could you help me? Thanks!
Based on: Greg Solution