URL Fun

  • Thread starter Thread starter swoolley
  • Start date Start date
S

swoolley

Please forgive my ignorance but I have been wondering how something is
done and I do not know what the technology is so I do not know how to
properly phrase the subject of this post....
Some web sites (like Microsoft's KnowledgeBase) use a method of
accessing particular articles via a url like:

http://support.microsoft.com/kb/12345/en-us

where I would write asp.net code to respond to a post such as:

http://support.microsoft.com/kb.aspx?articleid=152936

Notice the conspicuous absence of the params, "?", ".aspx", etc.

I am assuming this is done through some type of custom http handler, or
is there some easier method that I am missing?
 
Please forgive my ignorance but I have been wondering how something is
done and I do not know what the technology is so I do not know how to
properly phrase the subject of this post....
Some web sites (like Microsoft's KnowledgeBase) use a method of
accessing particular articles via a url like:

http://support.microsoft.com/kb/12345/en-us

where I would write asp.net code to respond to a post such as:

http://support.microsoft.com/kb.aspx?articleid=152936

Notice the conspicuous absence of the params, "?", ".aspx", etc.

I am assuming this is done through some type of custom http handler, or
is there some easier method that I am missing?
You might look into httpcontext.current.rewritepath
in the above example you could have a default.aspx file in the
kb/12345/en-us directory call the rewrite path. If there is no such
directory then the method is different. If there was an extension on the url
like http://support.microsoft.com-kb-12345-en-us.aspx then you could use the
global.asax file to rewrite the url.
Mike
 
Back
Top