Reminiscing this and that, on the web since 1995


Published tagged , , , .

A small web server serving 301 Moved Permanently or 302 Moved Temporarily to all requests.

Update :

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 .

Update :

Release 0.2 is out. Go get it! This fixes a small but serious bug; the -t parameter was actually ignored previously.


If you, for example, want to redirect all web traffic at http://foo.org to http://bar.org/foo, you just run

foo# webredirect -t http://bar.org/foofoo# webredirect -t http://bar.org/foo

... 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).

foo# webredirect -a foo.org -t http://bar.org/foofoo# webredirect -a foo.org -t http://bar.org/foo

See the included man page for more details.


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?

Write a comment

Your name (or pseudonym).

Not published, except as gravatar.

Your homepage / presentation.

No formatting, except that an empty line is interpreted as a paragraph break.