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 email@example.com.
Release 0.2 is out.
Go get it!
This fixes a small but serious bug; the
-t parameter was actually
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.
The C++ source for
webredirect is available from
It is also available as a FreeBSD port (and binary package).
You’re kidding, right?