You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by su2 <sh...@pexsupply.com> on 2010/02/16 16:41:29 UTC
[users@httpd] URL Rewrite goes into infinite loop
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] URL Rewrite goes into infinite loop
Posted by Krist van Besien <kr...@gmail.com>.
On Tue, Feb 16, 2010 at 4:41 PM, su2 <sh...@pexsupply.com> wrote:
> 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.
You have to look in your logfiles. What do you see in your access log,
and what in your rewrite log? If you don't have a rewrite log, enable
it. It could also be usefull to install a plugin like "Live HTTP
Headers" in Firefox, to see what is being sent back by the server.
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org