Forum Moderators: phranque

Message Too Old, No Replies

How to redirect HTTP CONNECT

need to redirect CONNECT method to ssl handler

         

slebetman

4:17 am on Dec 15, 2004 (gmt 0)



I'm not sure if this is possible but apache seems to have features which should be able to do this.

What I need to do is, if my server receives a CONNECT method on port 80, I need to treat the connection as SSL. HTTPS via port 443 is working fine but I also need to support it via CONNECT form port 80.

I don't want to porxy the CONNECT request, just want process it myself. This is so that I can support browsers with proxy enabled.

I'm doing the packet redirection to port 80 with iptables.

Anyone know if CONNECT method support is possible?

jdMorgan

2:35 pm on Dec 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



slebetman,

Welcome to WebmasterWorld!

You can use mod_rewrite to redirect these requests.

Use RewriteCond to check the %{REQUEST_METHOD} and %{SERVER_PORT} variables, and if a CONNECT is received on any post except 443, then use RewriteRule to redirect all resource requests to the same URL, but appending port 443 or replacing any existing port specification with port 443.

See our charter [webmasterworld.com] for useful references.

Jim