Problems with index module routing in symfony

I was working on simple symfony website consisting of just one application and one module. Naturally, I wasn’t too creative and choose ‘frontend’ as application name and ‘index’ for module name. When I started to test it on production, it wasn’t working at all except default action. It was giving me 404 error.
After spending some time debugging and logging symfony and mod_rewrite I’ve found out the problem. Rewrite rule was sending me to /index.php/actionname instead of index.php/index/actionname.
The problem was in apache option MultiViews, as soon as I removed it everything started to work as expected. This option tells webserver to search for foo/filename.* if foo/filename wasn’t found.
I had this option enabled in my default virtual host config in my apache distribution and I had never paid any attention to it before.

Tags: ,

AddThis Social Bookmark Button

One Response to “Problems with index module routing in symfony”

  1. Fran├žois Says:

    Thanks mate! This multiview thingy cost me a 2 day stall in dev!

Leave a Reply