Forum Moderators: phranque

Message Too Old, No Replies

breaking the infinite loop

breaking the infinite loop

         

testy

10:50 am on Jan 17, 2006 (gmt 0)

10+ Year Member



I have spent nearly two days on this. Any help is greatly appreciated..

I have a website with dynamic url's
e.g: [localhost...]

I have changed all my files to show static url's
as
[localhost...]

The RewriteRule to fetch dynamic pages for these static url's are working fine

RewriteCond %{REQUEST_URI} ^/(.*).html
RewriteRule ^([^/]+)/([^/]+)\.html [localhost...] [L]

The issue came when I want to redirect the dynamic url's to static url. I want no one to use dynamic url's any more. But when I used the following code it goes in to a infinite loop

RewriteEngine on
RewriteCond %{QUERY_STRING} ^category=([^&]+)\&subcategory=([^&]+)$
RewriteRule ^test.php /%1/%2\.html? [R]

RewriteCond %{REQUEST_URI} ^/(.*).html
RewriteRule ^([^/]+)/([^/]+)\.html [localhost...] [L]

testy

12:15 pm on Jan 17, 2006 (gmt 0)

10+ Year Member



The answers are here
[webmasterworld.com ]