Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: match anything after optional ? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mendel
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Online Status: Offline
Posts: 2
Posted: 07 August 2008 at 12:43pm | IP Logged Quote mendel

I need to match anything after an optional ?

e.g. /Widget\??(.*)

I want it should match /Widget, it should also match /Widget?a=b

but it should NOT match /Widget2, or /Widget_a, etc.

my template for this will be /Item.asp?id=1&$1

Back to Top View mendel's Profile Search for other posts by mendel Visit mendel's Homepage
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7559
Posted: 07 August 2008 at 7:40pm | IP Logged Quote Lexey

RewriteRule /Widget(?:\?(.*))? /Item.asp\?id=1?1&$1 [I,L]


Edited by Lexey - 07 August 2008 at 7:41pm
Back to Top View Lexey's Profile Search for other posts by Lexey
 
mendel
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Online Status: Offline
Posts: 2
Posted: 08 August 2008 at 11:04am | IP Logged Quote mendel

thanks for the prompt help
Back to Top View mendel's Profile Search for other posts by mendel Visit mendel'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 cannot vote in polls in this forum