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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.