Hello,

I'm quite nub in web development, so be gentle please. If this place is wrong for such problems point me to a more appropriate resource please.

To became more familiar with web-programming I found good (as I thought) area for self-improvement. One of my friends owns web project. This project was developed during last 15 years with one programmer who seems to be slightly tired and probably is needed for backup. I've tried (for the very beginning) copy all stuff to the new development environment and found that project consists of several tens of sites: site1.domain.name, site2.domain.name, etc. So the problem that sources contains about million hrefs to the absolute addresses. So I need any advices how to reorganize this project to make it more convenient like project.anotherdomain.name/site1 or any other approaches to moving project to the development environment. Project is mostly in PHP+mysql, so I'm affraid that db also can contain absolute addresses.

I use config files to set the host name for the site as well as other site wide settings. To be specific, config.php which sets the hostname & database details then all web files refer to config.php for the host name & login details - hopefully he has these files for the websites he made.

If he has hardcoded the IP address or hostnames into the websites files then i'd suggest notepad++ for a major search & replace party. You could automate the search replace one site at a time quite well but it will be a good lengthy job checking each site works and fixing the oddities in the coding that could come up, like I sometimes put URL's in CSS or JS for instance, or some parts use http and others https.

Thank you. I'll go this way. I had a hope that it's possible to use some tricks. May be requests redirection or something like this.