[英]error 500 Cakephp 3 in subfolder with OVH
I've developed a web application based on Cakephp 3 on a dev server. 我在开发服务器上开发了基于Cakephp 3的Web应用程序。 Now I'd like to go live.
现在我想上线。 So I uploaded my cakephp folder to my new server with the following architecture : www/site
所以我将cakephp文件夹上传到我的新服务器,其架构如下:www / site
Now when I try with the server's address like : http://test.cluster.ovh.net/site it's working fine. 现在,当我尝试使用服务器的地址时,例如: http : //test.cluster.ovh.net/site,它的工作正常。
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. 但是,当我尝试在子文件夹www / site上以ovh成员区域作为目标域( http://test.com和www.test.com)时,cakephp应用程序显示内部服务器错误500。
Here is my basic .htaccess in cakephp : 这是我在cakephp中的基本.htaccess:
<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.
[2016年3月22日22:07:26] [错误] [客户端xx.xxx.xx.xx] [host test.cluster.ovh.net]由于可能的配置错误,请求超出了10个内部重定向的限制。 Use 'LimitInternalRecursion' to increase the limit if necessary.
如有必要,使用'LimitInternalRecursion'增加限制。 Use 'LogLevel debug' to get a backtrace.
使用“LogLevel debug”获取回溯。
What should I do? 我该怎么办?
Thanks! 谢谢!
EDIT : Solution found here : Request exceeded the limit of 10 internal redirects 编辑:此处找到解决方案: 请求超出了10个内部重定向的限制
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 (.*)
. 您需要排除您正在重写的目标,否则您将收到重写循环错误,因为
site/webroot/
也匹配重写模式(.*)
。
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/site/webroot
RewriteRule (.*) site/webroot/$1 [L]
</IfModule>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.