送交者: slashdot 于 2005-6-29, 04:28:51:
回答: I don't know how to set that up. Is that web server setting? 由 xj 于 2005-6-28, 21:00:35:
So you can take the second approach: there is a config file for apache, often named httpd.conf, and add the line into either global setting or virtual server setting, depending on your configuration.
But I still have a hard time understanding why you are doing things the way you are doing. Probably just for the thrill of coding? ;) Because there are much simpler approaches to archieve it. First, you could set up a transparent (or reverse) proxy using squid or apache, both available on unix. Or, if you rather just pull the content from xys yourself, you can run wget to crawl the whole site, incrementally. This way, you don't have write a signle line of code. To make it better, you can put the wget script into a cron job to run it hourly or daily.
I mean, you do have telnet or ssh access to your server right?