Click here to Skip to main content
14,972,762 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
Hi,
I have implemented a web project.
Now i have to deploy this site. But before that i need to apply "Domain Rewriting" in my application.

Below is the example what i want.

My actual url would be : http://www.test.com

but i want it to display : http://www.abc.com

what should i do for this ?

please help me it is really urgent.

Thanks in advance.
Posted
Updated 16-Mar-11 19:27pm
v2

You need URL Rewriting.

Read here: URL Rewriting with ASP.NET[^]
MSDN: URL Rewriting[^]

OR

Read about, In ASP.NET 4.0: URL Routing[^]
   
Comments
HardikSitapara 17-Mar-11 3:31am
   
I know about url rewriting. But i want to change the name of the domain.
For example : if i hit on :
"http://www.abc2.com" thn it should go on "http://www.abc.com"
Sandeep Mewara 17-Mar-11 3:35am
   
Internally you can talk to any domain you want to. Just handle the requested url as per your need.

If you notice, CP also uses various domains at times... still we always see a "www.codeproject.com" url.
Espen Harlinn 17-Mar-11 3:39am
   
5 for the links, even though I think that the solution is just to deploy the solution on a server in the target domain :)
Sandeep Mewara 17-Mar-11 3:46am
   
Ya, but internally he has to handle the url such that if a particular url is requested to domain1 then it is routed to other domain2.
Espen Harlinn 17-Mar-11 9:49am
   
Can't seem to see anything in his question mentioning this - read it once more, I think he has some misconceptions about how dns works ...
Sandeep Mewara 17-Mar-11 10:25am
   
Hmmm.. Ok.

It still looks like... current url ABC but it should display BCD.

But, based on what you say now, that too could be the doubt of OP which is not at all clear.
Thanks Espen! :)
HardikSitapara 18-Mar-11 1:49am
   
Yeh sandeep, this is what i want.
Response.Redirect is the one if you want to do from a asp.net page on the page load event. But if you want server to handle then http://www.xoc.net/works/tips/domain.asp[^]. Search similar related links
   

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