1 Eylül 2010 Çarşamba

404 not found error in production mode in Symfony

As a developer using Symfony hosted on an Apache server, I experienced an issue with production mode of Symfony.

Normally, production mode is reached via appending index.php to the end of base url. But thanks to mod_rewrite module of apache, index.php can be omitted. And links in production mode does not have the corresponding index.php part. That is good for user experience, but there is a problem that when trying to reach them, Apache server gives 404 error.

The problem is that apache mod_rewrite module is not loaded by default. Installed tough, but not loaded. So you need to tell Apache to load it on start. You can do this by uncommenting the line starting with "loadModule rewrite..." in http.conf file. The file resides in conf directory of Apache folder. After making changes, restart the server and that's it, the problem is solved.

Hiç yorum yok:

Yorum Gönder