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

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -