I have one domain abc.com, i am going to host project on another domain xyz.com
but when I call abc.com it should point to xyz.com
How can I achieve this?
Project is in asp.net
i assume some html file need to be added in project with redirection code.
Thank You in advance !
Jignesh KumarPosted Jun 4, 2024, 4:20 AM
Hello shusanth,
You can achieve this using by adding the below code in Application_BeginRequest event
Sarthak VarshneyPosted Jun 3, 2024, 4:20 PM
To redirect one domain to another in an ASP.NET project, you can achieve this through a couple of methods. Here’s how you can set it up:
Method 1: Using the Web.config File
Web.configfile in the ASP.NET project.section:Method 2: Using Global.asax
Global.asaxfile in your ASP.NET project.Application_BeginRequestmethod:Method 3: Using HTML Meta Tag
This is a simpler method but not as robust as the server-side methods.
index.htmlfile in yourabc.comproject.Choosing the Best Method
Choose the method that best fits your project’s needs and server environment.