I am trying to get a site mirroring with wget, and came across a strange behavior.
Say I am mirroring an internal site named www.example.com in the following way, all seems to be working fine:
wget -mkE http://www.example.com
However, as I need to access the server by IP and not domain name, I try with:
wget -mkE -D www.example.com --header "Host: www.example.com" http://IPv4_ADDR
But in this case, it only downloads the first page and exits.
any idea?
When you use wget with http the only way it can determine what else is on the same site is via links in the retrieved pages. Depending on how those links have been created (absolute or relative), when you fetch via IP address the links may appear to wget to be external, in which case it won't follow them.