webredirect
Posted 2001-01-17 22:34. Last updated 2003-07-17 12:00. Tagged web, project, c++, http.
A small web server serving “301 Moved Permanently” or “302 Moved Temporarily” to all requests.
Update 2003-07-17: Relase 0.3 of webredirect is out on the ftp server. The main news in this release are:
Updated the C++ language usage, so this version works with gcc 3.x (and should work with other standard-compliant C++ compilers).
Added two command line options, to redirect temporarily instead of permanently and to redirect all requests to just the base target, without the path/file part of the requested URI appended. Submitted by Michael A Dickerson mikey@singingtree.com.
Update 2001-03-07:
Release 0.2 is out.
Go get it!
This fixes a small but serious bug; the -t
parameter was actually
ignored previously.
Usage
If you, for example, want to redirect all web traffic at
http://foo.org
to _http://bar.org/foo
, you just run:
… on the host foo.org.
In case foo.org is a virtual host (maybe even on the same physical
host as bar.org), you can tell webredirect
to listen only at the
foo.org interface (it must be a “real” virtual host, i.e. foo.org must
be a distinct IP address).
See the included man page for more details.
Source
The C++ source for webredirect
is available from
ftp://ftp.stacken.kth.se/pub/projects/webredirect/.
It is also available as a FreeBSD port (and binary package).
Screen shot
You’re kidding, right?
Comments
This post is 21 years old, comments are disabled.