Web site in new folder

Associate
Joined
29 Dec 2004
Posts
420
Location
Fife, Scotland
I've downloaded the website we plan to replace with a Wordpress one into a folder 'old' under /var/www, but there are lots of ways it's broken because it's no longer in /var/www.

This is on Debian using Apache2 & PHP5. The .conf files are splattered all over the place.

Is there an easy way to fix this?
 
Associate
Joined
2 Feb 2012
Posts
826
Location
Newcastle UK
Not 100% sure on this, but it could potentially be the links?

If the links are set to

<a href="/foldername/whatever.html">Link</a>

Then they will point to the root directory first. So a / takes you back to the very heart. ../ Takes you back one folder.

Just a potential troubleshoot.
 
Associate
OP
Joined
29 Dec 2004
Posts
420
Location
Fife, Scotland
Hopeing to find a solution that doesn't involve editing every damn file as this is the old site, don't want to spend much time on it...

Yes, you are right, the links are prefixed with '/'. Will have a think about it - using vi might make possible to alter, of course it might all fall apart bigstyle!
 
Last edited:
Associate
Joined
22 Jun 2012
Posts
1,070
Yeh a sub domain is the easiest option like Inogen mentioned, There isn't much more you can do without replacing links sadly, you can find programs to do a mass find replace, but this is hugely error prone obviously.
 
Associate
OP
Joined
29 Dec 2004
Posts
420
Location
Fife, Scotland
I can do a mass find & replace with vi but as you say it's error-prone., and there are nearly 100 page / PHP pages to deal with. A little editing has improved it possibly to the degree needed, but I'll look into a sub-domain, thanks for the suggestion. It's a pain but the website was written several years back so maybe that's part of the problem.
 
Soldato
Joined
19 Jul 2009
Posts
7,243
I can do a mass find & replace with vi but as you say it's error-prone., and there are nearly 100 page / PHP pages to deal with. A little editing has improved it possibly to the degree needed, but I'll look into a sub-domain, thanks for the suggestion. It's a pain but the website was written several years back so maybe that's part of the problem.

Send me a PM via trust and I can sort you out a subdomain and upload it there. At least you'd see if it works or not.
 
Back
Top Bottom