On 12/1/05, Rob Benton <rob.benton@xxxxxxxxxxxxxx> wrote: > > RewriteCond %{HTTP_HOST} !^my\.site [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteCond %{SERVER_PORT} ^(80|443)$ > RewriteRule ^/(.*) https://my.site/$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. Joshual. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx