View Single Post
Old 10th May 2008, 11:40 AM   #1 (permalink)
lobstu
Registered User
 
Join Date: May 2008
Posts: 5
Arrow CakePHP Configuration Issue

I have managed to get my CakePHP site working on my account.

DB, Sendmail, all fine.

One last niggle though, is that the CakePHP folder structure is set up such that your webroot isn't the root of the project. I have to use .htaccess to rewrite from / to /webroot/. This works fine, except for paths to folders.

Eg:

- site.com/file.htm will silently find and return site.com's www/html/webroot/file.htm.
- site.com/folder/file.htm will silently find and return site.com's www/html/webroot/folder/file.htm.

Both of these work as intended. However

- site.com/folder will REDIRECT the browser to site.com/webroot/folder and then return the default document for site.com's www/html/webroot/folder/.

I don't want that to happen. I have things working on my development PC, I simply changed the DocumentRoot in my apache config to point to the webroot folder. Can UnitedHosting do this for my account?

The other alternative is that I place the contents of webroot/* into /var/www/html and then place the rest of the files in some other PHP-accessible location. I'm guessing this is the tougher of the two to do due to permissions and security and such.

Either way, I need to ensure that these redirects do not occur because I am migrating a site with indexed web pages eg. site.com/blog. and it'll cause all sorts of hell for me if I don't fix it.

My preferred solution is simply to change the DocumentRoot.

Thoughts guys?
lobstu is offline   Reply With Quote