开发者

Moving a domain

开发者 https://www.devze.com 2023-01-30 16:35 出处:网络
Hi I am hoping for some advice. I have just managed to get a .co domain so I wish to point all requests from my .co.nz domain to the .co

Hi I am hoping for some advice.

I have just managed to get a .co domain so I wish to point all requests from my .co.nz domain to the .co I am running IIS7.5 I have created a services site e.g. services.mydomain.co.nz and the website mydomain.co.nz both are running on their own website and app pool.

At the moment I don't want to break any of the web services so I want to keep the services site as service开发者_Python百科s.mydomain.co.nz but I want to automatically redirect website users to the .co domain instead of .co.nz

So far I have added a new host header in IIS and this allows me to hit the website using the .co domain but I can still hit the site using .co.nz

Do I need to create a url rewrite function to help with this?


You can use http redirection in IIS to direct all requests at the old domain to exactly the same path at the new domain.

You want to choose options as I have in this photo:

Moving a domain

Include the full base url to the new site, ending at the slash after the domain name. then leave the other options as I have them; this way, any request at the old domain will be sent a 301 "permanent" code to redirect to the new, equivalent page on the new site.

Note that it's important that you do not check the first of those checkboxes under 'Redirect Behavior'; that will make it send all requests to the home page of your site, rather than to the same path url.

This should be on a separate IIS site, by the way.

0

精彩评论

暂无评论...
验证码 换一张
取 消