Forum Moderators: open
<%
Response.Status = "301 Moved Permanently"
Response.addheader "Location", "http://www.newdomain.com/newurl/"
Response.End
%>
Thus creating my 301 redirect page and communicating to the Search Engines that the site has moved.
I don't understand where else I could put a 301 command on a Microsoft IIS server.
Or what options do I have for such a redirect if I cannot get a host to change the server settings?
That's pretty much how I do it, except slightly more advanced. I've got a text file on the site that lists *all* the "oudated" pages and the appropriate redirect, and the custom 404 page figures out where to redirect based on that file. The 404 page also handles real errors more gracefully.
If you have a lot of old pages in the search engines, you'll want to make sure you have an appropriate redirect for each one of them - both so the spiders will eventually pick up the new page and so your visitors will land in the right place. Hard-coding every one of those redirects in the script seems like a lot of work; adding one to a simple text file is a lot easier.
My site is in ASP.NET but I think the code I used to do my custom 404 page was in straight ASP before I converted it, and I *think* I found it in a search of this forum. If you haven't already, spend a few minutes searching here and see what you come up with.
[edit]
So I did the searching for you... ;-)
Try these links: