Forum Moderators: phranque

Message Too Old, No Replies

Safest way to redirect

if you cant use htaccess

         

mack

2:26 am on Oct 11, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



What is the safest way to redirect traffic from your old domain to your new domain if your web host does not support htaccess?

dingman

3:04 am on Oct 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you can do PHP, this might help. I have it on a site where I used to have dynamic content and I want the same query string passed on to my current site location.

<?php
if ($QUERY_STRING) {$query = '?' . $QUERY_STRING;}
header("Location: [new.domain...]
?>

[edited 'cause I forgot to remove my own URL the first time]

jdMorgan

3:26 am on Oct 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mack,

What kind of server is your old site on? If it's Apache, are you sure they don't support any .htaccess at all? Many do, but don't support mod_rewrite because it's too "powerful and dangerous".

I once used the following single-line .htaccess on my old ISP's "free personal home page" server with good results when I changed ISPs:

Redirect permanent / [mynewdomain.net...]

Note: For username-type domains like "home.widgets.net/~jimbob", use:

Redirect permanent /~username [mynewdomain.net...]

Other than that, get most of your incoming links updated (especially ODP and Yahoo), put up a "Moved - click here" manual link, and hope for the best! You could also try a javascript redirect if you want, but include the manual link too, for the 'bots to follow.

That's what I'd do... YMMV

Jim

mack

4:11 am on Oct 11, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I emailed them and they say they dont suport htaccess. They run apache, so i uploaded an htaccess file just incase the person who emailed wasn't in the know. No sucess.

I can't use php either.. unsuported :(

dcheney

5:03 am on Oct 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use a small page with a bit of javascript to do the forward. The html on the page consists of a 1 line saying something like "go to yyy" (which is a link to the new page and a message like "this would have occurred automagically if javascript was available".

mack

6:23 am on Oct 11, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I was concidering using a JS redirect, Is this sort of practice acceptable or is it frowned upon by the se's?

dingman

3:31 pm on Oct 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't know if SEs like it better or worse than javascript redirects, but javascript-free browsers are likely to prefer <meta http-equiv="redirect" >