On Thu, Oct 21, 2010 at 8:07 AM, jmdesign
<[email protected]> wrote:
> Okay managed to get access to the error logs and they say the
> following:
>
> "mod_rewrite: maximum number of internal redirects reached. Assuming
> configuration error. Use 'RewriteOptions MaxRedirects' to increase the
> limit if neccessary."

You likely have a redirect loop, so increasing the number of redirects
probably won't help. I guess it's ~possible~ that the client's hosting
setup chews through a few redirects, so you could try setting it to
something like 20 (I can't remember the default, but 20 should be far
more than enough) and see what happens. If it does start working,
decrease the number until it breaks again. But I'd put my money on a
loop.

The way Cake's redirection works is through two .htaccess files--one
above app/ and one inside app/ dir. Both of these forward any requests
to that dir to app/webroot/index.php. It's that file that ultimately
handles all requests. A third .htaccess file inside app/webroot checks
if the requested file exists inside that dir (so you can directly
serve your css, js, or other html or php files). If it doesn't, the
request is passed to index.php inside webroot.

If mod_rewrite isn't available, there's an index.php inside the app
dir. that simply includes app/webroot/index.php. But it appears that
mod_rewrite is functioning for you.

Can you clarify something? You said that the web root should be inside
this london dir. But 'london' does not have to appear in the URL? Is
that correct?

Anyway, it could be that you're missing the top-level .htaccess file
(the one ABOVE app). It should have:

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

The one inside app should be:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    webroot/    [L]
    RewriteRule    (.*) webroot/$1    [L]
 </IfModule>

Finally, the one inside webroot:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to