【发布时间】: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]
【问题讨论】:
-
Please use
FallbackResourcefor basic fancy URL implementations。使用mod_rewrite就像在橡皮艇上发射大炮一样。
标签: linux apache .htaccess redirect url-rewriting