Forum Moderators: open

Message Too Old, No Replies

setting up a new domain redirecting page

when you change your domain

         

sugar2

10:48 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



hi, im changing my domain from store.domain.com to new one www.domain.com, the thing is: when google searches, it will print bad urls before new indexing, but i have an idea, after domain changin i can setup a redirecting pages javascrpt script in the 301 redirecting page, such as:
[PSEUDO-code]
if the searched page is:
var current_domain: store.domain.com
var current_page: GET_URL(); (i.e. page.html)
newdomain: www.domain.com
then redirect to www.domain.com/page.html
new location = newdomain+page
[/PSEUDO-code]

then each error page will be redirected to the proper new domain page until google updates its index database

what do you think is this doable?

thanks

RonPK

8:36 am on Jun 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To the best of my knowledge there's no such thing as a "301 redirecting page". The 301 (redirect permanent) header is normally followed by a Location: header. In other words, no HTML is sent to the client, so there is no page where javascript can be used.