Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This should not be a difficult question to answer. I'd like to know how to write a shortcut that takes a long URL and using a web site, take a very long and complex URL and redirect it as follows:

http://www.mysite.com/newurl

This should take the user to another web site, much as tinyurl.com does. This can't be hard to do on an existing site. How do I do that?

Bob Delaney
Mississauga, Ontario
[email-id removed]
Posted
Updated 13-Jan-11 17:38pm
v2
Comments
Baji Jabbar 13-Jan-11 23:10pm    
Are you conducting "Quiz program" in CP and evaluating the CPians. You have mentioned its not a difficult question to answer :) so I asked .

Rewriting Url[^] may be useful.

Or CP Archive Item[^] may help.
 
Share this answer
 
v2
Comments
justinonday 13-Jan-11 22:46pm    
Good link
Ankur\m/ 14-Jan-11 0:08am    
Good Answer! :)
Anupama Roy 14-Jan-11 1:03am    
Good One!
thatraja 14-Jan-11 4:06am    
Good answer DD
As DD has already said, you need URL Rewriting.

Articles with sample, read here: URL Rewriting with ASP.NET[^]

OR

Read about, In ASP.NET 4.0: URL Routing[^]
 
Share this answer
 
Comments
Anupama Roy 14-Jan-11 1:03am    
Good One!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900