Forum Moderators: phranque
<%
Response.Status = "301 Moved Permanently"
Response.addheader "Location", "http://www.newdomain.com/newurl/"
Response.End
%>
at the bottom of the page.
My question is, the page seem to redirect but it goes directly to the new url without seeing the pause page saying that this domain has been changed?
How do I get the pause to see the page?
Thanks
<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" content="2;URL=http://www.yoursite.com/newpage.htm">
<TITLE>Page has moved</TITLE>
</HEAD>
<BODY>
whatever you want to write
</BODY>
</HTML>
Forgive me if I'm missing something, but isn't a meta refresh a temporary redirect?
A meta refresh is not the same as a 301 redirect - but you are missing something: when the server issues a 301 redirect, it tells the user agent that the page is no longer there and has been moved permanently. So, there can be no content or pause as if there is content, the page still exists. If you want to tell your users that the page has moved, then a meta refresh is the only way - but the old domain would still be indexed unless you put this on the page as well:
<meta name="robots" content="noindex,follow"> Make sure you have a standard link to your new domain on your redirect page for the robot to follow (robots don't follow meta refreshes).
As for redirecting your whole site, I can give you the Apache .htaccess code, but as it appears you are using ASP I assume you have a Windows/IIS server - I'm sure one of the many Windows experts will be able to give you the answer.
<edit reason: beaten to it! />