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.

  1. http://www.url.com/abc123
  2. http://www.url.com/default.aspx?code=abc123
  3. 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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -