Article delegate-en/2217 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] Is this a possible use for delegate?
23 Apr 2003 04:08:03 GMT testuser <>

I've done it, using 'iptables --REDIRECT' in linux.

iptables -t nat -A PREROUTING -d -j ACCEPT
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT 
--to-ports 81

Then I wrote a short program that listened to port 81 (using xinetd)
and redirected them to the web server on port 80.  The program on port 
81 just reads (and parses) the input given, and returns the following:
HTTP/1.1 302 Moved Temporarily
Cache-Control: no-cache
Expires: 0
Pragma: no-cache
Content-Type: text/html

This is a redirecting page.<BR>
Please go <A HREF="//">here</A>

There are four different ways of redirecting a user, and I've used them 
all.  The script doesn't try to give a real web page because it's easier 
to let Apache do it.

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]