Re: Webroot / .htaccess issue
Managed to finally solve this with a bit of fiddling!
I basically moved the entire webroot folder to the public_html folder,
as well as the tmp and config files, overwriting the .htaccess and
index.php (so I now have just 3 .htaccess files), and the index.php as
well (updated the paths in the index file).
So it was a mod rewrite issue after all!
On Oct 15, 6:26 pm, number9 <xpozit...@gmail.com> wrote:
> 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 aswww.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 cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home