Installing CakePHP 1.2 in a Subdirectory
Posted by Doug Hays on the 17th of March, 2009 at 4:02 pm under CakePHP. This post has 145 comments.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 kushaura.com 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.
Thanks, Kushaura.com!