c# - How to transform ASP.NET URL without URL routing or URL rewrite? -
i using asp.net 2.0 on iis6 therefore can’t use system.web.routing. i’ve tried few url rewriters none did wanted.
i need transform (read/parse redirect) url 1 2 minimum iis configuration because don't have full authority reconfigure web servers (i.e. isap on iis6 or install 3rd party extensions/libraries). , can’t transform url 3 because physical links break.
- http://www.url.com/abc123
- http://www.url.com/default.aspx?code=abc123
- http://www.url.com/abc123/default.aspx?code=abc123
thank you!
create 404 error handler, e.g. 404.aspx. in page, parse request url , extract code using request.path
. then, redirect default.aspx?code=abc123.
you should able set 404 (page not found) handler 404.aspx website, hosting providers allow that.
Comments
Post a Comment