0

i have My url like MyTravel/Tour/Inner.aspx?Pid=2&Cid=8 Goa/New-Goa/)

Here Pid and cid are coming from home page's menu which can be different according to menu selection.(My menu is created from database)

and some links generate url like MyTravel/Tour/displaypackage.aspx?Pid=32&Cid=18&deptf=ND

i rewrite it as MyTravel/Tour/Goa/new-goa/ here goa and new-goa are saved in my database table on the basis of pid and cid.

I have used urlrewriter.net(Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter) for Url rewritting

Please tell me how I write my rewrite rule to match these type of urls in my configuration file.

Cœur
  • 37,241
  • 25
  • 195
  • 267
angfreak
  • 993
  • 2
  • 11
  • 27
  • Dear sir @ Paul Zahra can you please give me a code....... thanks a lot – angfreak Apr 23 '13 at 08:11
  • Please post the rewrite rule you use, surely it's just a simple change, i.e. &deptf=([A-z]+) – Paul Zahra Apr 24 '13 at 12:24
  • Dear sir @ Paul Zahra I have 2 types of url when my inner.aspx is called with two querystring i have used and when displaypackage.aspx called with 3 querystring then I have used But when access my querystring in the page(.cs) it only gives inner as a param value of context(which I have used url rewriter) Please help me!!!!!!!!!! – angfreak Apr 26 '13 at 05:00

1 Answers1

1

I think the () brackets you have around inner are confusing the issue so you have actually specified 4 parameters...

For:

MyTravel/Tour/displaypackage.aspx?Pid=32&Cid=18&deptf=ND

Try something like:

<rewrite url="~/MyTravel/Tour/displaypackage\.aspx\?Pid=([0-9]+)&amp;Cid=([0-9]+)&amp;deptf=([a-zA-Z]+)" to="~/MyTravel/Tour/$1/$2/$3" />
Paul Zahra
  • 9,522
  • 8
  • 54
  • 76