【问题标题】:.htaccess: Request exceeded the limit of 10 internal redirects [closed].htaccess:请求超出了 10 个内部重定向的限制 [关闭]
【发布时间】:2013-06-07 22:43:50
【问题描述】:

我知道这个问题之前已经得到解答,但是 .htaccess 文件的设计非常个人化,我发现很难将其他帖子中的修复应用到我的 .htaccess 文件中。这个 .ht 在 webdir 的根目录中访问它并导致此错误:

"[error] [client 1.1.1.1] 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".

如果有人能指出我的 .htaccess 中的缺陷,我将不胜感激!谢谢!

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(.*)\.  (gif|jpeg|jpg|png|css|js|pdf|doc|xml|ico|html|php|json|swf|mp3|ogg|wav)$
RewriteCond %{REQUEST_URI} !(service)
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/                  [L,R=301]
RewriteRule ^[^/.]*/(.*)    app/$1     [L]

【问题讨论】:

标签: linux apache .htaccess redirect url-rewriting


【解决方案1】:

不知道你想做什么,但看起来你需要一个:

RewriteCond %{REQUEST_URI} !app/

就在之前:

RewriteRule ^[^/.]*/(.*)    app/$1     [L]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-04
    • 2019-03-08
    • 2018-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-25
    • 2015-11-18
    相关资源
    最近更新 更多