1

I've developed a web application based on Cakephp 3 on a dev server. Now I'd like to go live. So I uploaded my cakephp folder to my new server with the following architecture : www/site

Now when I try with the server's address like : http://test.cluster.ovh.net/site it's working fine.

But when I try to target (with ovh member area) my domains http://test.com and www.test.com on the subfolder www/site, my cakephp app is showing an Internal server error 500.

Here is my basic .htaccess in cakephp :

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

Error log :

[Tue Mar 22 22:07:26 2016] [error] [client xx.xxx.xx.xx] [host test.cluster.ovh.net] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

What should I do?

Thanks!

EDIT : Solution found here : Request exceeded the limit of 10 internal redirects

Community
  • 1
  • 1
Ty Yt
  • 466
  • 2
  • 9
  • 25

1 Answers1

0

You need to exclude the destination you are rewriting to otherwise you will get a rewrite loop error because site/webroot/ also matches the Rewrite pattern (.*) .

<IfModule mod_rewrite.c>
    RewriteEngine on
 RewriteBase /
 RewriteCond %{REQUEST_URI} !^/site/webroot
 RewriteRule (.*) site/webroot/$1    [L]
</IfModule>
Amit Verma
  • 40,709
  • 21
  • 93
  • 115