0

setting in the .htaccess

RewriteEngine On
RewriteRule ^b\.html$ a.html [L]
RewriteRule ^a\.html$ b.html [L]

but got in dead-loop forever unless httpd stop.
the rewrite.log logged called eachother interval:

192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81c3498/initial] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81caef8/initial/redir#1] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /a.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81cb750/initial/redir#2] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81cc650/initial/redir#3] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /a.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81cd488/initial/redir#4] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81ce438/initial/redir#5] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /a.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81cf228/initial/redir#6] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d0370/initial/redir#7] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /a.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d1278/initial/redir#8] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d24b8/initial/redir#9] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /a.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d3510/initial/redir#10] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d4878/initial/redir#11] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /a.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d5ad8/initial/redir#12] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d7010/initial/redir#13] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /a.html [INTERNAL REDIRECT]
192.168.0.11 - - [07/Apr/2005:13:15:47 --0400] [home.java.net.nl/sid#8145548][rid#81d8778/initial/redir#14] (1) [per-dir /usr/local/apache/htdocs/app/] internal redirect with /b.html [INTERNAL REDIRECT]

what is my wrong, isn't [L] means the last one to match, then quick out of this request?

Frederick

1
Contributor
1
Reply
2
Views
12 Years
Discussion Span
Last Post by Zcoral
0

the infinit loop seems caused by the misunderstanding of rewriterules: as long as it rewrited, it will run through the chains again, not quit only

frederickbc
d

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.