.net - UrlRewriting with urlrewritingnet -


i want rewrite url below http://www.abc.com/ac/ac0008 http://www.abc.com/temp/urlrewriter.aspx?oldurl=/ac/ac0008

and

http://www.abc.com/ac/ac0008?vmid=233 http://www.abc.com/temp/urlrewriter.aspx?oldurl=/ac/ac0008/vmid=233

so, in urlrewritingnet rule this

  <add name="ac_redir1"    virtualurl="^~/ac/ac0008?vmid=(.*)"    rewriteurlparameter="excludefromclientquerystring"    destinationurl="~/temp/urlrewriter.aspx?bike=y&amp;oldurl=/ac/ac0008?vmid=$1"       ignorecase="true" /> 

but rule works 1st url only, 2nd url sends /ac/ac0008 , doesn't send /ac/ac0008/vmid=233

can give me sample rule rewriting url querystring parameters. can idea this.

thanks.

i think have messed code.

for 2nd rule, new url this, ~/temp/urlrewriter.aspx?bike=y&oldurl=/ac/ac0008?vmid=233"

then when access query strings below

string oldurl = request.querystring["oldurl"]; strign vmid =  request.querystring["vmid"]; 

now

oldurl = "/ac/ac0008" vmid = 233 

you wont

oldurl = "ac/ac0008?vmid=233" @ once :) 

hope idea.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -