使用CakePHP htaccess的在Justhost的帐户500错误 [英] htaccess with cakephp on justhost account 500 error

查看:236
本文介绍了使用CakePHP htaccess的在Justhost的帐户500错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,在justhost.com帐户.htaccess文件。我收到恒定的内部500错误,我曾尝试在网络上许多不同的解决方案。这里是我的htaccess文件是这样的:

I am having an issue with the .htaccess file on a justhost.com account. I recieve constant internal 500 errors and I have tried many different solutions around the web. Here is what my htaccess files look like:

ROOT的.htaccess

ROOT HTACCESS

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

应用程序/ .htaccess的

app/ HTACCESS

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

应用程序/ Web根目录/ .htaccess的

app/webroot/ HTACCESS

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

问题是,我得到这个错误日志:

The issue is that I get this in the error log:

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.

香港专业教育学院尝试设置的RewriteBase到/但它不解决此问题。

Ive tried setting the RewriteBase to / but it doesnt correct the issue.

推荐答案

您必须在三个.htaccess文件使用重写基地。一个在其中包含目录的应用程序,LIB,插件和供应商的根目录应该看起来像

You have to use Rewrite base in three .htaccess files. The one in the root directory which contain directories app , lib , plugin and vendor should look like

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

该应用程序/ htaccess的形式应为

The app / htaccess should look like

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

和最终的应用程序/ Web根目录/ htaccess的形式应为

And finally the app/webroot/htaccess should look like

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

如果你的lib不在根文件夹中,你将不得不也改变core.php文件中的值映射到相应的地址。对于您可以检查出的高级安装在库克的书。

If your lib is not in the root folder you will have to also the change the values in core.php to map it to relevant address. For that you can check out the advanced installation in the cook book.

这篇关于使用CakePHP htaccess的在Justhost的帐户500错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆