I am building a new site and I want to keep my old site running while it is being build. I was going to put it in a folder called /new However I am unsure about how to move it once it is done. I was going to use relative urls, but I have had problems with this before with images in the stylesheet. Can anyone suggest what is the best way to do this? thanks.
The standard is to use SVN for developers and server(s). Once the work is done on the developer's sides, push it to the live branch and update from that branch on the server. All done and efficient as ever. It sounds sort of complex but it should take even the slowest learner 2 days at max if they go to SVN's official site and read how to do it. Basically it takes 2 clicks and one command on linux. If you aren't using SVN for creating websites then you really need to learn now, as it's once of the most crucial things to know (I think).
What's their site? I get lots of results in google from svn. 2 days to learn is quite a long time. I can update all the links myself in a few hours.
I make a PHP variable that I export to Javascript, called SITE_ROOT_URL. Then all my images use that PHP variable plus a sub-url within the site-software itself. For instance (in in-line html of a .php file <?=SITE_ROOT_URL?>art/component/titlebar.png
I would just to what you orginally planned and put it in a folder called new with all relative URLs. Then create an images folder inside their and act like /new is your root folder. Then when you are ready, just copy everything from that folder into your root directory.
The problem with that is that my menu is done using php includes. It has to use absolute urls because subfolders inside the new folder will not point to the correct pages otherwise.