I have a website located, say, at http://www.abc.com
. I need to make it available at, say, http://www.cde.com
. I tried to download the site using wget, but encountered two problems:
- There are many internal absolute links. Wget can convert them to relative links, but I would feel safer if I had them converted to root-relative links insted (ie.
/mypath/myfile
rather than../../mypath/myfile
) or to absolute links in the new location (http://www.cde.com/mypath/myfile
) - The site intensively uses scripts for navigation, so some paths look like
http://www.abc.com/index.html?p=123
, etc. wget downloads and saves them in files likeindex.html?p=123, index.html?p=456
, etc. It is suitable for offline viewing, but I expect that in the new site the scripts would work, so I would only need to have anindex.html
file (plus requisits, csses, scripts, but I think I already know how to download them)
I know that I can simply delete the spare files with "?" in the file names, but I would prefer to avoid unnecessary downloads in the first place
How can I solve these two issues?