mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Implement --forward.
A web forward feature that performs 301 redirects for some requests (in addition normal web content serving) The "Host:" request header (HTTP/1.1 only) is compared with a list of hosts, defined by the "--forward host url" option. If a match is found, the request is redirected to url+path. Otherwise, it is served as a request to the local file system.
This commit is contained in:

committed by
Emil Mikulic

parent
1b10a57f39
commit
ab7af194e6
4
README
4
README
@ -45,6 +45,10 @@ Use acceptfilter (FreeBSD only):
|
||||
Run in the background and create a pidfile:
|
||||
$ ./darkhttpd /var/www/htdocs --pidfile /var/run/httpd.pid --daemon
|
||||
|
||||
Web forward (301) requests for some hosts:
|
||||
$ ./darkhttpd /var/www/htdocs --forward example.com http://www.example.com \
|
||||
--forward secure.example.com https://www.example.com/secure
|
||||
|
||||
Commandline options can be combined:
|
||||
$ ./darkhttpd ~/public_html --port 8080 --addr 127.0.0.1
|
||||
|
||||
|
Reference in New Issue
Block a user