URL Rewrite goes into infinite loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

I have following rule 

-------------------------------------------------------- 
RewriteMap urlspm txt:/usr/local/etc/manual_redirects.txt 
RewriteCond ${urlspm:%{REQUEST_URI}} ^(/.*)$ 
RewriteRule ^.*$ %1 [P,L] 
-------------------------------------------------------- 

and in manual_redirects.txt i have following. 

-------------------------------------------------------- 
/Abc-173000-b /ex/control/brandLanding?SEARCH_STRING=Abc&~category_id=B173 
-------------------------------------------------------- 

I get following error. 

in firefox 

-------------------------------------------------------- 

The page isn't redirecting properly 

Firefox has detected that the server is redirecting the request for this
address in a way that will never complete. 
* This problem can sometimes be caused by disabling or refusing to accept
cookies. 
-------------------------------------------------------- 

in google chrome 

-------------------------------------------------------- 
The webpage at [xyzcom...] has resulted in too many redirects. Clearing your
cookies for this site or allowing third-party cookies may fix the problem.
If not, it is possibly a server configuration issue and not a problem with
your computer. 
-------------------------------------------------------- 

in IE it goes nowhere, i tried for half hour and it shows its processing. 

Now, when I change my .txt file to following(for test purpose) it works. 
-------------------------------------------------------- 
/Abc-173000-b /ex/control/category/~category_id=B173 
-------------------------------------------------------- 

The entire rewrite file is
-------------------------------------------------------- 
RewriteEngine On 

RewriteRule /ex/control/main / [R=301,L] 
RewriteRule ^/$ [127.0.0.1...] [P,L] 

#for newsletters 
RewriteRule ^/img/spacer.gif /newsletter/img/spacer.gif [R,L] 

RewriteCond %{QUERY_STRING} ^N= 
RewriteRule ^/controller.asp(.*) /ex/control/category/~category_id=0 [R=301] 

RewriteMap urls txt:/usr/local/etc/ex_301.txt 
RewriteCond ${urls:%{REQUEST_URI}} ^(/.*)$ 
RewriteRule ^.*$ %1? [R=301,L] 

RewriteCond ${urls:%{REQUEST_URI}?%{QUERY_STRING}} ^(/.*)$ 
RewriteRule ^.*$ %1? [R=301,L] 

RewriteMap urlsp txt:/usr/local/etc/redirects.txt 
RewriteCond ${urlsp:%{REQUEST_URI}} ^(/.*)$ 
RewriteRule ^.*$ %1 [P,L] 

RewriteMap urlspm txt:/usr/local/etc/manual_redirects.txt 
RewriteCond ${urlspm:%{REQUEST_URI}} ^(/.*)$ 
RewriteRule ^.*$ %1 [P,L] 
-------------------------------------------------------- 

I have a feeling that my URL request is getting into infinite loop somehow.
But not sure how and where. 

I would appreciate the help. 

Thank you in advance. 
-- 
View this message in context: http://old.nabble.com/URL-Rewrite-goes-into-infinite-loop-tp27610227p27610227.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux