Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Loop Flag Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
lad4bear
Newbie
Newbie


Joined: 01 May 2008
Online Status: Offline
Posts: 2
Posted: 19 September 2008 at 11:59am | IP Logged Quote lad4bear

Hi Guys

I've copied the the following rewrite rule from the help files

RewriteRule ^(.*?\.asp)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA]

Am testing it with the following string:

test.asp/name/1/age/1/color/blue

And getting the following output:

test.asp?color=blue?name=1?age=1

instead of:

test.asp?color=blue&name=1&age=1

which kind of suggest there is something wrong with the rule.

Does any body know the correct one. And can explain explain what the LP flag actually does because it really isn't clear at all in the help file.

Cheers

Pete

Back to Top View lad4bear's Profile Search for other posts by lad4bear
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4701
Posted: 23 September 2008 at 1:34am | IP Logged Quote Anton

Are you testing in RegEx Test or on a real site?
RegEx Test has a small fault but the rule should work
fine on the site.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
lad4bear
Newbie
Newbie


Joined: 01 May 2008
Online Status: Offline
Posts: 2
Posted: 23 September 2008 at 4:41am | IP Logged Quote lad4bear

Hi Anton,

Thanks for getting back to me. Unfortunately, it's hard to say. I have to modify the rule quite a bit for my specific case but this is tricky as the help docs don't really explain how the flag works.

Can you explain what the Loop flag does and how it does it? i.e how the loop flag know which part of the rule to apply etc. I think knowing this might help me to figure out what I need to do.

Cheers

Peter

Back to Top View lad4bear's Profile Search for other posts by lad4bear
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 24 September 2008 at 5:13pm | IP Logged Quote Vyacheslav

Hi Peter.
Here is description of LP flag from documentation:
Quote:

Re-runs current single rule in the loop while it’s pattern and conditions are matched. Number of iterations is limited to a value of 200 to avoid infinite loops.


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum