Forum Moderators: buckworks & webwork

Message Too Old, No Replies

Redirecting pages to a new domain from a non-domain website

Need some advice from the experts in the forum on how to do this right!

         

DTopSpirit

8:57 am on Jun 22, 2005 (gmt 0)

10+ Year Member



Hi all,

I'm hoping this is the right forum - if not could some kind moderator please move it?

Anyway, the background to my problem is this. I set up a small personal website on an ISP member account, which means that I don't have a domain name - it's through their member pages (ie www.members.XXXX/~yyyyyy/index.html )

You can probably already see where this is going - the site has become more popular, and I've suddenly got plans for expansion etc (delusions of grandeur maybe!). So I'm about to buy a domain name and put the site on a web host. I've done some research and am happy with my choice of host etc - no problems there.

So now I'm about to transfer my site across, but I've got no access to any .htaccess files etc. The actual ISP I'm with doesn't even manage where my site is currently hosted - there is no support at all. So what should I do to make sure that users get across to the new website OK, besides a meta-refresh?

I was planning to keep the current file structure of the old site, and put meta-refreshes on all the pages to go to the correct page on the new site, and take out any content on the old pages to avoid duplicate content penalties. After a few months (once the search engines find my new site and start spidering and indexing) I'll take down the old site pages completely, and maybe run some other stuff there. I'll also inform anybody I can find linking to me that the site has moved, and ask them to update the links.

Is there anything else I can or should do to make the transfer go smoothly, bearing in mind I have no access to any cgiscripts, or PHP, or .htaccess files or any of that stuff? I just want to avoid the usual problems that seem to crop up when people do this sort of thing. So I would be very thankful for any help from those with experience in doing this.

Regards,

Greg

hakre

9:10 am on Jun 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi greg,

no access to php or .htaccess? do you have got a control panel where you can setup a 404 page?

anyway, one shoot i would try in your case is to use the very oldskool "http-equiv" meta tag and tell the client (maybe the robots eat this) what's going on. i never did this before so i can not tell you if this will work or whats a potential downside in practise, but that would be the code:

<meta http-equiv="status" content="301 Moved Permanently" />
<meta http-equiv="location" content="[i]h**p://newaaddress.here/in[/i]" />

this has to be placed into the head tag of your (x)html document. normally this can be solved with a php (or other) script or apache configuration (.htaccess) itself. more info [webmasterworld.com]

Romeo

9:26 am on Jun 22, 2005 (gmt 0)

10+ Year Member



... and don't forget -- besides all those <meta>s -- to put a plain old "a href=" text link within the <body> of your old pages with a short "Hi and thanks for visiting. This interesting page has moved here <...> now. See you there."

So eveybody will get the message, and you won't have to worry which search bot can read your meta redirects or not.

Regards,
R.

DTopSpirit

9:29 am on Jun 22, 2005 (gmt 0)

10+ Year Member



Hi hakre,

Just went back to double check on my site - looks like I do have access to PHP after all. I had a test.php file with the following contents
<?
phpinfo();
?>

which when loaded in a browser brings up a whole heap of info about the PHP and Apache configuration, most of which I have no clue about.

Will having PHP make it a whole lot easier? I've done some programming in my time, but not anything web related. I'm happy to look it up if someone can point me in the right direction. Also, I still don't want to miss anything else I should be doing.

Greg

DTopSpirit

9:30 am on Jun 22, 2005 (gmt 0)

10+ Year Member



Thanks Romeo,

That's exactly the sort of thing I mean - something that's blindingly obvious once somebody else mentions it, but I'd overlooked it so far. Cheers!

Greg

hakre

11:06 am on Jun 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i just noticed that my "more" link did not explain quite well how to do it with php and after you wrote php ist there then i would suggest you to do 2 things:

try to map .html to be handled as .php files. that way you can replace all existing .html files with .html named files but containing the following php code:

<?php 

header("Status: 301 Moved Permanently",true,301);

$newurl = "www.example.com";

/* remove '~yyyyyy/' */

$newurl .= substr($REQUEST_URI,8);

header("location: h**p://$newurl");
?>

that way, you only have to rename the file and it will automatically redirect (maybe an include is even better to maintain the code).

DTopSpirit

3:54 pm on Jun 22, 2005 (gmt 0)

10+ Year Member



Thanks for the advice hakre, but I'm afraid most of it went straight over my head. :( Obviously I've got a lot to learn - I know what you are getting at when you say mapping html to php but I have no idea how to do it.

Is the code you wrote to do the mapping or the redirect, or both? You can see my level of knowledge (or ignorance) here.

Also, I've been doing some reading and see that Meta-refreshes are frowned upon by search engines, so maybe that isn't the way to go.

Would a simpler but more labour intensive way be to simply put a link on each old page to the new page, and remove the content on the old page? Eventually I would be able to simply drop the old site pages, once the search engines know the location of my new site? It would mean my readers would have to click on the link, but I guess I could live with that for a while. Would this work? I can live with a temporary drop in search engine rankings - I'm not getting much traffic from them anyway at the moment. Just so long as they can find my new site OK, I guess that is the main thing.

Greg