Forum Moderators: mack

Message Too Old, No Replies

How to 301 redirect shtml pages? help!

         

learning1

7:56 pm on Jan 8, 2008 (gmt 0)

10+ Year Member



I have seen a lot of ways to use 301 redirect with php, asp, jsp, etc type pages but I need to redirect shtml pages and do not want to loose the current rankings. We do not have admin access to the iis server. I have used javascript, but I don't think this tells the search engine it is a 301, permanent change. Any thoughts or ideas? The site is on a windows server. Thanks

germanharp

5:22 pm on Jan 10, 2008 (gmt 0)

10+ Year Member



Its your luck day...mine too! I am having the same problem and I found some magic

<meta http-equiv="refresh" content="10;
url=http://mynewsite.com/">

I have tested it and it works. In my old html file I put this meta tag at the top of the page (after changing url to new location) and it still loads the old page and then after 4-5 seconds it loads the new page.

Works for me. I hope you don't have too many files to modify. I have 60 :-(

Not unless someone has a better solution?

germanharp

5:29 pm on Jan 10, 2008 (gmt 0)

10+ Year Member



I am not sure if this is the best solution though. Seems messy. I don't like having old files hanging around. Does anyone know a better solution or in time will our (learing1 and I) be able to delete the old files?
Thanks

learning1

5:32 pm on Jan 10, 2008 (gmt 0)

10+ Year Member



I found that method as well..but in using a meta tage redirect you will loose the ranking (if any) in the search engines. I have desided to use a javascript redirect to an .asp page that has the ASP method of redirect -

<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.yourdomain.com/"
%>

I am hoping this will help keep some of the search engine traffic until the new site gains its own.

Not sure if it is going to work...time will tell.

PS - in your meta tag code - if you change the content="10" to content="0" the page will change without a delay.

germanharp

5:48 pm on Jan 10, 2008 (gmt 0)

10+ Year Member



Great thanks for the tips.

jdMorgan

6:04 pm on Jan 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just be aware that a meta-refresh is not a 301 redirect; Handling of this client-side method is determined by the user-agent (browser, search engine robot, etc.) and can vary.

Server-side methods are available to generate proper 301-Moved Permanently server responses, and should be used whenever possible. On Apache, see mod_alias and mod_rewrite. For IIS (Windows servers), see ISAPI Rewrite. Most Web scripting languages can also be used to generate server-side redirect responses if your pages are dynamically-generated.

See RFC2616 [w3.org] for a description of HTTP/1.1 server response codes.

Jim

learning1

6:16 pm on Jan 10, 2008 (gmt 0)

10+ Year Member



I did see information on the ISAPI Rewrite..however in my case I do not have access to the admin level of the server so I am trying this workaround with the redirect to an asp page since there seems to be no method for existing pages with .shtml