Can I use the redirector to return HTTP redirect messages?
Normally, the redirector feature is used to rewrite requested URLs. Squid then transparently requests the new URL. However, in some situations, it may be desirable to return an HTTP “301” or “302” redirect message to the client. This is now possible with Squid version 1.1.19. Simply modify your redirector program to prepend either “301:” or “302:” before the new URL. For example, the following script might be used to direct external clients to a secure Web server for internal documents: #!/usr/local/bin/perl $|=1; while (<>) { @X = split; $url = $X[0]; if ($url =~ /^http:\/\/internal\.foo\.com/) { $url =~ s/^http/https/; $url =~ s/internal/secure/; print “302:$url\n”; } else { print “$url\n”; } } Please see sections 10.3.2 and 10.3.3 of RFC 2068 for an explanation of the 301 and 302 HTTP reply codes.
Normally, the redirector feature is used to rewrite requested URLs. Squid then transparently requests the new URL. However, in some situations, it may be desirable to return an HTTP “301” or “302” redirect message to the client. This is now possible with Squid version 1.1.19. Simply modify your redirector program to prepend either “301:” or “302:” before the new URL. For example, the following script might be used to direct external clients to a secure Web server for internal documents: #!/usr/local/bin/perl $|=1; while (<>) { @X = split; $url = $X[0]; if ($url =~ /^http:\/\/internal\.foo\.com/) { $url =~ s/^http/https/; $url =~ s/internal/secure/; print “302:$url\n”; } else { print “$url\n”; } } Please see sections 10.3.2 and 10.3.3 of RFC 2068 for an explanation of the 301 and 302 HTTP reply codes. 15.5 FATAL: All redirectors have exited! A redirector process must never exit (stop running). If you see the “All redirectories have exited” message, it probably means your redirector pr