關於linux與windowsXP上apache 地址修正的不同

來源:互聯網
上載者:User
在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設定的問題呢?


回複討論(解決方案)

不好意思,上面部分寫錯了,現在更正為:
在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設定的問題呢?

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層了

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上面就報錯了。
  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.