I wan't deploy my work which was based on Zend Framework 1.0,if i use
url-rewrite just like the manual,i must encounter a internal error in
apache!

If the .htaccess is like this:

RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php

The result must be like this:

Internal Server ErrorThe server encountered an internal error or
misconfiguration and was unable to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform
them of the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.

And this Debug info will be appare in the error.log:

[Mon Aug 20 11:58:33 2007] [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.
[Mon Aug 20 11:58:33 2007] [debug] core.c(3046): [client 127.0.0.1] r->uri =
/index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /index.php
[Mon Aug 20 11:58:33 2007] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /

I think the web server is rewriting in a unterminate loop!

But if i write the .htaccess like this:

RewriteEngine On
RewriteCond %{REQUEST_URI}
!^.*(\.css|\.js|\.html|\.zf|\.gif|\.pdf|\.rar|\.ppt|\.chm|\.png|\.jpg|\.jpeg)$
RewriteRule ^(/.*)$ /index.php

And the web server will nerver rewrite at all!

Definetly , my apache2 server have loaded the mod_rewrite.so

Is there any one have encounter this error?

Env is like this:
CPU:AMD Athlon 64 X2 Dual
OS: Windows XP sp2
Apache : 2.24
PHP:5.23

Reply via email to