Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Guys,,

I have seen on many websites that for example if we are visiting a page named blog of that site than URL showing in browser is used to be like "www.sitename.com/blog" while if we want that we can also access the same page by typing "blog.sitename.com"....

How this functionality can be created and implemented in a web application made in Visual Studio on .net framework.


Can anybody help in this Regard.??


Regards,


:)
Posted

There are several ways to rewrite URLs.

We can rewrite URLs from IIS settings with 'URLRewrite' module of IIS.

We can rewrite URL from global.asax file.

Referance as follows:
http://www.iis.net/learn/extensions/url-rewrite-module/iis-url-rewriting-and-aspnet-routing[^]
http://blog.dotnettechy.com/2011/09/url-rewriting-in-aspnet-using.html[^]
 
Share this answer
 
Comments
VICK 4-Jun-13 2:59am    
Of too much high level according to a little mind and novice like me... :(

Gone over head.. can you elaborate in simplest way and in fewer lines rather dn providing links ...?????
 
Share this answer
 
Comments
VICK 4-Jun-13 2:59am    
Of too much high level according to a little mind and novice like me... :(

Gone over head.. can you elaborate in simplest way and in fewer lines rather dn providing links ...?????
Sergey Alexandrovich Kryukov 4-Jun-13 3:09am    
And is this the reason to vote 1? It's up to you of course, no matter.
But, regardless the vote, it simply means you won't get help. Who would want to waste time.

Essentially, you blame others for your own laziness and inability. This is not welcome.
You should understand that if something is over your head (even in digested form), you should so something easier.

—SA
VICK 4-Jun-13 3:17am    
Y r u getting so hyper.. voting is the form to show either it was helpful or not .. so if it didnt help me out regardless of my laziness or inability... or you just performed what i have already google... I just voted what is right to me...

Sorry for being rude but everyone have right to express. and u cant force .

further I have a logic to join CODE PROJECT .. just to increase my knowledge and to get the help in informal way.... coz i m not here to read the theory.. i am here to ge the benefit of expert knowledge (as of you) in precise way...



anyway sorry if it hurts you (Although you downvoted my question and threatened me that I WONT get help... :) )....
Sergey Alexandrovich Kryukov 4-Jun-13 3:29am    
No reading theory? OK, forget programming right now, why torturing yourself. Case closed. Who questions your right?.. There, there, it's not going to be interesting...
No need to apologize, nothing like that can hurt me personally, no problems with that. I just tried to explain your wrongdoing, which might matter something for you, not me. No problem, anyway...
—SA
VICK 4-Jun-13 3:49am    
okay fine.. but can you answer me that y u downvoted my question?? waiting for answer.

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