url_lfs_rewrite - a URL-rewriter based on local file existence
url_lfs_rewrite [--debug] --local-dir=/var/www/ [options]
This program uses Squid concurrency support.
Default: http
Default: localhost
If set it must end with a '/'.
Default: use the original URL path.
* URL with no filename in the path can match directories on the local
filesystem and be wrongly redirected to the local web server.
* Any scheme name accepted by the Perl URL library can be used
as the --to-scheme parameter. However only schemes supported by
Squid will work.
* URL containing query-string are not handled well and will not
be rewritten even if the base script or file exists on the local
system.
url_rewrite_program /path/to/url_lfs_rewrite --local-dir=\var\www\localhost url_rewrite_children 20 startup=1 idle=1 concurrency=25 url_rewrite_access deny CONNECT url_rewrite_access deny to_localhost
This helper can redirect to any web server but only does so if there is a file matching the URL path segment in the local filesystem. Normal configuration requires a web server running on localhost serving up files from a local disk (eg. \var\www\localhost). Configuration of that web server is not covered here.
Based on prior work in rredir.pl by Peter Eisenhauer <pe@pipetronix.de>. First Version: 26. May 1997
* Copyright (C) 1996-2021 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for details.
Report bugs or bug fixes using http://bugs.squid-cache.org/
Report serious security bugs to Squid Bugs <squid-bugs@lists.squid-cache.org>
Report ideas for new improvements to the Squid Developers mailing list <squid-dev@lists.squid-cache.org>
The Squid FAQ wiki http://wiki.squid-cache.org/SquidFaq
The Squid Configuration Manual http://www.squid-cache.org/Doc/config/