asp.net - IIS Url rewrite username -


how can rewrite url in iis

mysite.com/profile.aspx?user=foo

to

mysite.com/foo

this rewrite condition i've tried in .htaccess

rewriterule /foo/(.*) /bar?arg=p1\%3d$1 [r,ne] 

but how can in iis url rewrite?

quite simply:

<rule name="profile rewrite" stopprocessing="true">     <match url="^([^/]+)/?$" />     <conditions>         <add input="{request_filename}" matchtype="isfile" negate="true" />         <add input="{request_filename}" matchtype="isdirectory" negate="true" />     </conditions>     <action type="rewrite" url="profile.aspx?user={r:1}" /> </rule> 

note apache rewrite rule won't expect @ all. note can generate url rewrite visual configure tool within iis manager.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -