Redirection rather that reuploading site
Posted: Mon Sep 27, 2010 11:44 am
I have a client for whom I do ongoing "back end" MIS work, and had done a website that was admittedly not all that great. I am a database guy, not a web designer, and had been urging him to contract with a design type to get the client side redone in a more attractive and marketing-oriented manner. He finally did, and it has not been going all that well. The guy put something together with WordPress and, beyond the manipulations provided by that platform, does not really have much of a clue as to how to do anything.
He's been doing the development in a subdirectory of the site ("new") and testing by going to http://www.mainsite.com/new/ (not a real link, so don't click on it). I observed that he had links in his development that were http://www.mainsite.com/new/whatever/page.php instead of ../whatever/page.php, that is to say, absolute rather than relative, and commented to my client that that might create problems when he tried to move it. It had already created problems when he moved it, for reasons that I never figured out, from "test" directory to "new" directory.
He "went live" over the weekend, but instead of moving the new files to the root directory, he simply putas the first line in index.php in the root directory. He told the client that doing it by moving the files would require 48-72 hours for the new site to "go live" which I told my client was absolute nonsense.
I have login traps througout the site which are,
Which will result in a double redirect. Is that going to be a problem? In other cases the redirect is not to index.php, but is to cportal.php which is definitely a problem. I can put a redirect in that one as well, but how big of an issue is this whole thing, with the actual site not being in the "public root directory" but in a subdirectory with redirection?
He's been doing the development in a subdirectory of the site ("new") and testing by going to http://www.mainsite.com/new/ (not a real link, so don't click on it). I observed that he had links in his development that were http://www.mainsite.com/new/whatever/page.php instead of ../whatever/page.php, that is to say, absolute rather than relative, and commented to my client that that might create problems when he tried to move it. It had already created problems when he moved it, for reasons that I never figured out, from "test" directory to "new" directory.
He "went live" over the weekend, but instead of moving the new files to the root directory, he simply put
Code: Select all
header('Location: http://www.mainsite.com/new/');
I have login traps througout the site which are,
Code: Select all
if (!isset($_SESSION['regownr']))
{ header("Location:../../index.php");
exit; // kick them back to main page
}
Which will result in a double redirect. Is that going to be a problem? In other cases the redirect is not to index.php, but is to cportal.php which is definitely a problem. I can put a redirect in that one as well, but how big of an issue is this whole thing, with the actual site not being in the "public root directory" but in a subdirectory with redirection?