Link to home
Start Free TrialLog in
Avatar of seanwhyte
seanwhyte

asked on

Custom URL like http://site/variablename/variable

How do I make a custom URL in ASP.NET ??

I want to do something like http://site/variablename/variable instead of having http://site/index.aspx?variablename=variable

a good example of what I am looking for is in the following URL (ASIN in variable and then after is the value) ...
http://www.amazon.com/exec/obidos/ASIN/0123456789/qid=987654321/sr=2-1/ref=sr_2_1/104-3613846-7485503


How can I do this, is there something in web.config? or some other way (server settings)?

Sean
Avatar of nauman_ahmed
nauman_ahmed
Flag of United States of America image

You can use the technique that EE is using. See the following URL:

https://www.experts-exchange.com/questions/21046110/Custom-URL-like-http-site-variablename-variable.html

In this case Q_21045110.html do not really exist. Instead this is redirected to a custom 404 page that displays the posted data accordingly. I read this few days ago on an EE post but do not have the URL. :(

Best, Nauman
ASKER CERTIFIED SOLUTION
Avatar of ihenry
ihenry

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of seanwhyte
seanwhyte

ASKER

ihenry,

The CodeProject tutorial was what I was looking for! thanks!

Sean