关于linux与windowsXP上apache 地址重写的不同

footprint2008 2014-07-21 03:26:19
在windows上面
RewriteCond %{HTTP_HOST} ^([^\.]+).test.com$
RewriteRule ^(.+)/(.+)\.html$ %1/base/ss$1@$2.html [PT]
RewriteRule ^(.+).html$ index.php/$1 [L]
上面的规则在winowsXP上可以以通过但是在linux上面报错,查看错误日志内容如下
[Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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.
[Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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.
[Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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.
[Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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.
[Mon Jul 21 15:14:56 2014] [error] [client 192.168.7.176] 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.
[Mon Jul 21 15:14:56 2014] [error] [client 192.168.7.176] 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.

在linux下面需改成下面的规则才行
RewriteCond %{HTTP_HOST} ^([^\.]+).test.com$
RewriteRule ^(.+)/(.+)\.html$ %1/base/ss$1@$2.html [PT]
RewriteRule ^(.+).htm$ index.php/$1 [L]

我希望在linux和在windowsXP上面一样,都用.html
请问有什么办法吗?是不是httpd.conf设置的问题呢?
...全文
127 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
footprint2008 2014-07-21
  • 打赏
  • 举报
回复
引用 2 楼 xuzuning 的回复:
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. 超过了每次请求最大10次重写的限制 LimitInternalRecursion表示,可能递归调用了,被rewrite反复拦截,深度超过10层了
的确是递归了。因为 RewriteRule ^(.+)/(.+)\.html$ %1/base/ss$1@$2.html [PT] RewriteRule ^(.+).html$ index.php/$1 [L] 第二条拦截了所有以.html接尾的地址 第一条又只向了一个.html的地址。 但是windowsxp在执行了第一条就停了能正常访问,可在linux上面就报错了。
xuzuning 2014-07-21
  • 打赏
  • 举报
回复
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. 超过了每次请求最大10次重写的限制 LimitInternalRecursion表示,可能递归调用了,被rewrite反复拦截,深度超过10层了
footprint2008 2014-07-21
  • 打赏
  • 举报
回复
不好意思,上面部分写错了,现在更正为: 在windows上面 RewriteCond %{HTTP_HOST} ^([^\.]+).test.com$ RewriteRule ^(.+)/(.+)\.html$ %1/base/ss$1@$2.html [PT] RewriteRule ^(.+).html$ index.php/$1 [L] 上面的规则在winowsXP上可以以通过但是在linux上面报错,查看错误日志内容如下 [Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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. [Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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. [Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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. [Mon Jul 21 15:14:55 2014] [error] [client 192.168.7.176] 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. [Mon Jul 21 15:14:56 2014] [error] [client 192.168.7.176] 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. [Mon Jul 21 15:14:56 2014] [error] [client 192.168.7.176] 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. 在linux下面需改成下面的规则才行 RewriteCond %{HTTP_HOST} ^([^\.]+).test.com$ RewriteRule ^(.+)/(.+)\.html$ %1/base/ss$1@$2.htm [PT] RewriteRule ^(.+).html$ index.php/$1 [L] 我希望在linux和在windowsXP上面一样,都用.html 请问有什么办法吗?是不是httpd.conf设置的问题呢?

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧