[thelist] [apache(?)] ubuntu, apache2, cakephp and mod_rewrite (oh my!)

Paul Bennett Paul.Bennett at wcc.govt.nz
Tue Apr 8 16:21:04 CDT 2008

Hi all,

It seems to be my week for odd questions...

I've set up php5, apache2, mysql5 on my Ubuntu machine (7.04) but am struggling to get mod_rewrite to work how I expect it.
I've followed every tutorial or mod_rewrite related article I can get my hands on, but still to no avail.

Basically this will render (using cakephp):

But this url gives a 404 (not a cakephp error - a 404)

Apache2 -M tells me mod_rewrite is enabled
Apache2 force-reload even tells me that I'm trying to load mod_rewrite twice (!) and so it ignores the 2nd load
Phpinfo() tells me mod_rewrite is loaded for PHP5

I have a sneaking suspicion that mod_rewrite *is* working, as redirects to /var/www/apache2-default/, which follows this rule set in /etc/apache2/sites-available/default

Does anyone know why the url /localhost/class/method/ won't resolve?

I'm seriously at a loss here - any help appreciated :)


More information about the thelist mailing list