summary:
my-host-here.com/app_dev.php/main = works
my-host-here.com/main = 404 error
my-host-here.com/app.php/main = also gets a 404 error
I've looked at various links (symfony.com and discussions here in SO) and tried their suggestions/answers but no luck here.
Any ideas on how to fix it? Thanks a lot!
I'm using Apache 2.4.x/PHP 5.4.x which were installed using the yum repository on RHEL7.
snippet of httpd.conf
Include conf.modules.d/*.conf
snippet of 00-base.conf which resides inside conf.modules.d
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
snippet of 10-php.conf which resides inside conf.modules.d
LoadModule php5_module modules/libphp5.so
snippet of my virtualhost config file
<VirtualHost *:80>
ServerName my-host-here.com
DocumentRoot /opt/www/my-host-here/web
<Directory /opt/www/my-host-here/web/>
DirectoryIndex app.php
AllowOverride All
Require all granted
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
</Directory>
The contents of the .htaccess inside /opt/www/my-host-here/web is whatever Symfony came with. I never changed it. Symfony project was created using the command:
symfony new my_project_name lts