Home  >  Article  >  Backend Development  >  关于linux与windowsXP上apache 地址重写的不同,该怎么处理

关于linux与windowsXP上apache 地址重写的不同,该怎么处理

WBOY
WBOYOriginal
2016-06-13 12:02:58982browse

关于linux与windowsXP上apache 地址重写的不同
在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设置的问题呢?
------解决方案--------------------
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层了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn