Serve mirrored (static) web-page with original headers

Posted by aioobe on Server Fault See other posts from Server Fault or by aioobe
Published on 2012-07-04T15:11:09Z Indexed on 2012/07/04 15:17 UTC
Read the original article Hit count: 240

Filed under:
|
|
|

I have a dynamic webpage which I want to create a "frozen" copy of.

Typically I would do something like wget -m http://example.com, and then put the files in the document root of the web-server.

This site however has some dynamic content, including dynamically generated images, for instance

http://example.com/company/123/logo

This means that in order to mirror the page, I need to

  1. Save whatever headers the server currently serves for each URL.

    This can be done using the wget option --save-headers.

  2. Serve the static pages and serve the proper headers for each file.

    (This I have no idea of how to do.)

What is the best way to solve this? Any suggestions are welcome.

© Server Fault or respective owner

Related posts about http

Related posts about wget