#### BOF SSU
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /refm/
# Deny access from .htaccess
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]
#### EOF SSU
我一直在 Ubuntu 上使用相同的 .htaccess 代码,它工作正常,现在我在 Windows 机器上工作,它似乎不起作用,当我点击内部页面上的任何内容时,它总是加载主页. 基本上,这个 .htaccess 所做的是为 Zen Cart 页面和产品启用漂亮的永久链接。.htaccess 文件被 Apache 识别,因为我检查了httpd.conf
配置,我检查了error.log
,这是我发现的错误:
[error] [client 127.0.0.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.
我还更改了LogLevel
todebug
而不是warn
查看错误的详细信息,这就是我得到的:
[Tue Jun 05 23:31:09 2012] [error] [client 127.0.0.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., referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3065): [client 127.0.0.1] r->uri = /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/index.php/index.php/index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/index.php/index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /index.php/css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-
type-page-38
[Tue Jun 05 23:31:09 2012] [debug] core.c(3071): [client 127.0.0.1] redirected from r->uri = /css/style.css, referer: http://localhost/refm/refm-excel-products-by-property-type-page-38
所以似乎有某种循环。你能帮我弄清楚吗?谢谢!