I wanted to publish a php-based website made by me on a different server, but only as static HTML pages, since the php was only used for convenient automatic layouting of complex image arrangements (long story...)
Anyway:
I couldn't just use my browser and use "Save As...", because all the links would point to invalid filenames if saved as static HTML. They had to be rewritten. *sigh*
[SOLUTION]
Thanks to the GNU/Linux community and the Free Software people, who always seem to have thought about almost everything - including implementing a comfortable solution, I found a short article on the Linuxjournal-website about creating an offline copy using "wget" - which immediately, and perfectly, came to the rescue and saved my day.
In order not to use that valuable information, I thought I'd post it here, too. The commandline arguments I've actually used, were like this:
Code: Select all
$ wget \
--recursive \
--level=3 \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.org \
--no-parent \
WEBSITE_ADDRESS (like https://whatever.com/dude/...)
I like it when a tutorial also mentions which arguments, and why, they're using:
- --recursive: download the entire Web site.
- --no-parent: don't follow links outside the directory tutorials/html/.
- --page-requisites: get all the elements that compose the page (images, CSS and so on).
- --html-extension: save files with the .html extension.
- --convert-links: convert links so that they work locally, off-line.