httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] redirecting everything to ssl
Date Thu, 01 Dec 2005 18:56:06 GMT
On 12/1/05, Rob Benton <> wrote:
> RewriteCond %{HTTP_HOST}   !^my\.site [NC]
> RewriteCond %{HTTP_HOST}   !^$
> RewriteCond %{SERVER_PORT} ^(80|443)$
> RewriteRule ^/(.*)$1 [L,R]
> That will direct all https:// traffic to the right hostname but trying
> to use http:// still results in the bad request error:
> "Your browser sent a request that this server could not understand.
> Reason: You're speaking plain HTTP to an SSL-enabled server port.
> Instead use the HTTPS scheme to access this URL, please."
> I must have missed something else in the config file.  I have 2 Listen
> directives, 1 for 80, and 1 for 443.

You probably have SSL turned on for the entire server, rather than
just for the requests coming in on port 443.  As I mentioned in an
earlier reply, you should have two vhosts: one for ssl on 443 and one
for non-ssl on 80.  The second one just redirects to the first and the
SSLEngine directive is only in the first one.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message