1URL_LFS_REWRITE(8) User Contributed Perl Documentation URL_LFS_REWRITE(8)
2
3
4
6 url_lfs_rewrite - a URL-rewriter based on local file existence
7
9 url_lfs_rewrite [--debug] --local-dir=/var/www/ [options]
10
12 Direct all request to files who are in a local directory to a local web
13 server hosting this directory.
14
15 This program uses Squid concurrency support.
16
18 --debug Write debug info to stderr.
19
20 --local-dir Directory path under which the scripts searches for files.
21
22 --to-scheme Scheme to use for the redirected URL.
23
24 Default: http
25
26 --to-host Domain name to use for the redirected URL.
27
28 Default: localhost
29
30 --to-path URL path to add as prefix for the redirected URL path.
31
32 If set it must end with a '/'.
33
34 Default: use the original URL path.
35
37 * The --local-dir parameter must end with a '/'. Otherwise no
38 file paths will be found.
39
40 * URL with no filename in the path can match directories on the local
41 filesystem and be wrongly redirected to the local web server.
42
43 * Any scheme name accepted by the Perl URL library can be used
44 as the --to-scheme parameter. However only schemes supported by
45 Squid will work.
46
47 * URL containing query-string are not handled well and will not
48 be rewritten even if the base script or file exists on the local
49 system.
50
52 url_rewrite_program /path/to/url_lfs_rewrite --local-dir=\var\www\localhost
53 url_rewrite_children 20 startup=1 idle=1 concurrency=25
54 url_rewrite_access deny CONNECT
55 url_rewrite_access deny to_localhost
56
57 This helper can redirect to any web server but only does so if there is
58 a file matching the URL path segment in the local filesystem. Normal
59 configuration requires a web server running on localhost serving up
60 files from a local disk (eg. \var\www\localhost). Configuration of that
61 web server is not covered here.
62
64 This program and documentation was written by Amos Jeffries
65 <squid3@treenet.co.nz>
66
67 Based on prior work in rredir.pl by Peter Eisenhauer
68 <pe@pipetronix.de>. First Version: 26. May 1997
69
71 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
72 *
73 * Squid software is distributed under GPLv2+ license and includes
74 * contributions from numerous individuals and organizations.
75 * Please see the COPYING and CONTRIBUTORS files for details.
76
78 Bug reports need to be made in English. See
79 http://wiki.squid-cache.org/SquidFaq/BugReporting for details of what
80 you need to include with your bug report.
81
82 Report bugs or bug fixes using http://bugs.squid-cache.org/
83
84 Report serious security bugs to Squid Bugs
85 <squid-bugs@lists.squid-cache.org>
86
87 Report ideas for new improvements to the Squid Developers mailing list
88 <squid-dev@lists.squid-cache.org>
89
91 squid (8), GPL (7),
92
93 The Squid FAQ wiki http://wiki.squid-cache.org/SquidFaq
94
95 The Squid Configuration Manual http://www.squid-cache.org/Doc/config/
96
97
98
99perl v5.32.1 2021-03-31 URL_LFS_REWRITE(8)