Apache的redirect和设置caching头?
在Apache中做redirect很简单(mod_alias): RedirectMatch ^.*$ http://portal.example.com/ 设置caching标题同样简单: Header set Cache-Control max-age=0 Header set Expires "Thu, 01 Dec 1994 16:00:00 GMT" (我不想这个caching) 但! 看来你不能把两者结合起来。 这个configuration会导致redirect被发送,但不是标题: <VirtualHost *:80> ServerName __default__ Header set Cache-Control max-age=0 Header set Expires "Thu, 01 Dec 1994 16:00:00 GMT" RedirectMatch ^.*$ http://portal.example.com/ </VirtualHost> 实际发生的例子: jb@apto % telnet 192.168.0.1 80 Trying 192.168.0.1… Connected to redirector.example.com. Escape […]