Click to See Complete Forum and Search --> : [RESOLVED] how to migrate in the new site without removing the old site?


nolawi
04-11-2006, 12:52 AM
ok I'm developing a new website for an existing domain... the new site is dynamic so i have to work on it online... the old site is still working...

this is work in progress so it will take me about a month to get it all together...

so i'm gonna be using a cms... which has an index.html file so if i upload it now it will take down the old file...

what i want to do is move the old file to mydomain/temp/ but i want it to continue to work

so this i assume this is simple to do but over the year i never had to do it so how do i make the vistors go directly to the old site... what do i have to do to the index.html file

bathurst_guy
04-11-2006, 06:34 AM
What I do is add a simple php scripting. If a regular visitor comes via www.sdstudio.com.au , they get redirected to my old site www.sdstudio.com.au/sds/

If I want to look at the new site that I'm working on, I visit www.sdstudio.com.au/?sam

This is the small script that I have in the top of the page
<?php
if(!isset($_GET[sam])){
header("Location: www.sdstudio.com.au/sds");
}
?>

TiGGi
04-11-2006, 09:39 AM
what's your web server (IIS. Apache)?

nolawi
04-11-2006, 10:01 AM
its linux apache... i think....

i have a linux with php plan with godaddy...

bathhurst can u be a little more clearer... i put the code in the index.html at the bottom of the domain ????

<Eddie>
04-11-2006, 10:12 AM
What bathurst is explaining is you can redirect to another resource using a PHP page. All regular visitors get sent to the old site but if you tag the address you get sent to the new site. The code posted will need to be put into a PHP file, called index.php and set as the root document.

nolawi
04-11-2006, 11:04 AM
^ ok that is the info i needed..(index.php)...

i'll let you guys know if i have any problems this afternoon

nolawi
04-11-2006, 10:06 PM
ok it worked case closed