PDA

View Full Version : Ripping websites onto your hard drive


Phishie
06-03-2008, 05:18 PM
Hey guys,

Yesterday the MySQL server for my site was screwed up pretty much all day. So I thought I'd share with you guys my workaround for the day.

I am by no means a coder, so this is for everyone.

I used a program called HTTrack (http://www.httrack.com/) to rip my php website into HTML. Now the website becomes static instead of database driven.

After copying the site to my local HDD, I then create a folder in the site's root directory called html. So http://www.sandstormtechnical.com/html. Upload the copied site from your local disk into that html folder on your FTP.

Now create a blank index.html file and put the following code in it:

<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=http://www.sandstormtechnical.com/html">

Upload the index.html document you just created to your site's root folder. This code tells the page to instantly redirect to www.sandstormtechnical.com/html. So now when somebody visits your database driven site, instead of seeing PHP errors, they will see an HTML copy of your site which should look nearly identical to your php site. The only thing is that forms and some other database features will not work.

Whenever your MySQL server is back to normal, go ahead and delete that index.html file to go back to normal.

For an example on how it looks you can visit my original site at http://www.sandstormtechnical.com and the cloned HTML version at http://www.sandstormtechnical.com/html

Enjoy

P.S. GIMME SOME REPUTATION FOR THIS!!! :D:D:D