What is the best way to redirect an entire classic ASP website to a new domain?

I need to redirect the entire classic asp website to the new domain, while maintaining the search engine ranking of the old site.

I think 301 redirects are required, but not sure if the best way to do this would be, as I don't think. htaccess runs on a server running IIS.

I would prefer not to change existing ASP files individually, since there are quite a lot of them.

Any suggestions would be great.

Thanks in advance.

+3
source share
1 answer

I don't know if there is a better method, but I use IIS constant redirection:

  • Go to the "Home Directory" tab of the site properties.
  • " URL"
  • http://yournewurl $S $Q " " "
  • " URL, ", " "

, http://youroldurl/path/page?querystring http://yournewurl/path/page?querystring

.

PS: II6, IIS 7 , .

Update:

404 404:

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://yournewurl/"
%> 
+7

Source: https://habr.com/ru/post/1728732/


All Articles