Software and Technology Ramblings

March 17, 2009

Installing CakePHP 1.2 in a Subdirectory

Filed under: CakePHP — Doug Hays @ 4:02 pm

I needed to test some CakePHP code on a client’s 1and1 server today, so I dropped my CakePHP app in a subdirectory (called agents2) on his site. ┬áBut, after doing so, I kept getting “Class ‘Configure’ not found”. ┬áLuckily, I stumbled upon this blog post over at which saved me.

The core issue was with my root .htaccess file which needed to be changed to:

      RewriteEngine on
      RewriteBase    /agents2/

      RewriteRule    ^$ app/webroot/    [L]

      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule (.*) app/webroot/$1 [L]

And that did the trick.


Powered by WordPress