FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-24-2008, 06:21 PM
"Andrea Ganduglia"
 
Default https to http

Hi, how can I redirect HTTPS requests to HTTP?

https://www.domain.com => http://www.domain.com

A simple iptables port redirection

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT
--to-port 80

allow client connections, but drop request.

How Can I solve this?

--
Openclose.it - Idee per il software libero
http://www.openclose.it


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-24-2008, 07:11 PM
Tristan Terpelle
 
Default https to http

On Fri, 24 Oct 2008 20:21:18 +0200, "Andrea Ganduglia"
<nonews.org@gmail.com> wrote:
> Hi, how can I redirect HTTPS requests to HTTP?
>
> https://www.domain.com => http://www.domain.com
>
> A simple iptables port redirection
>
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT
> --to-port 80
>
> allow client connections, but drop request.
>
> How Can I solve this?
>


If you're using Apache, you can use mod_rewrite to rewrite https to http
requests. I'm doing the exact opposite using this rule:


RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
RewriteRule ^/$ https://%{SERVER_NAME}/ [L,R]

Enable the module using "a2enmod rewrite". Adapt the above example
appropriately.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-24-2008, 10:55 PM
Frank Lanitz
 
Default https to http

Hi,

On Fri, 24 Oct 2008 20:21:18 +0200
"Andrea Ganduglia" <nonews.org@gmail.com> wrote:

> Hi, how can I redirect HTTPS requests to HTTP?
>
> https://www.domain.com => http://www.domain.com

I'm afraid I don't have a valid solution for your question, but I've
got a question: Why is something like that useful?

Thanks,
Frank
--
http://frank.uvena.de/en/
 
Old 10-24-2008, 11:50 PM
Miles Fidelman
 
Default https to http

Frank Lanitz wrote:
Hi,


On Fri, 24 Oct 2008 20:21:18 +0200
"Andrea Ganduglia" <nonews.org@gmail.com> wrote:


Hi, how can I redirect HTTPS requests to HTTP?

https://www.domain.com => http://www.domain.com



I'm afraid I don't have a valid solution for your question, but I've
got a question: Why is something like that useful?

Probably better asked on the Apache list (or whatever server you're
using), but it presents an interesting question:


You might try putting a redirect statement in your config. file, and
restarting your server. Two possibilities:

- the server will issue the redirect - what you seem to want
- the server will first do the https exchange, and THEN issue the
redirect, in which case, what's the point?


And, as Frank asked: why is it useful in any case?

--
In theory, there is no difference between theory and practice.
In practice, there is. .... Yogi Berra



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org