I have setup a cakephp installation so that the app, cake and webroot
folders have been moved from their default location. I have updated
the values in the /webroot/index.php and the application is working
fine, except that the webroot is not being recognised as the
public_html root.
Instead of images being displayed as www.domain.com/img/img-name.jpg,
they need a path from the public_html.
How can I set the webroot as the site root without interfering with
everything else (which is working fine). I suspect it is a mod rewrite
issue... but I'm not sure.
Here is the layout and .htaccess files:
/etc/app (contains APP folder)
/etc/app/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
/etc/cake (contains CAKE folder)
/etc/cake/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
/public_html/app/webroot (contains WEBROOT folder)
/public_html/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~sitebase/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
/public_html/app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
Do the .htaccess files look right? Or is this more likely to be
something to do with the webroot/index.php file?
Thanks in advance for any help - I've tried changing various things
with no joy.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---