Redirection Problem - apache 2.0.58
am 20.08.2007 20:14:27 von ShadowEyezHi all, first time post
Using apache 2.0.58, on gentoo linux, with mod_rewrite, mod_ssl,
mod_alias, and other standard modules in apache. I'm trying to redirect
the classic:
http://mydomain.com to https://mydomain.com in the httpd.conf file using
both Redirect (mod_alias) and Rewrite rules (using mod_rewrite) but
neither are working at all.
Using mod_alias
#Redirect permanent / https://mydomain.com
and
#Redirect permanent / https://mydomain.com/
do not work
The same with mod_rewrite
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
and
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://mydomain.com [L,R]
The error_log file for apache says:
[Mon Aug 20 11:01:41 2007] [info] SSL handshake failed: HTTP spoken on
HTTPS port; trying to send HTML error page
[Mon Aug 20 11:01:41 2007] [info] SSL Library Error: 336027804
error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request speaking
HTTP to HTTPS port!?
I get this error regardless of which method I try, and even if I put
none of these in the config file, I get the same error. If using IE as
the client, the page simply sits there, firefox is smart enough to load
a page saying
"
Bad Request
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.
Hint: https://mydomain.com
"
How do I redirect this? I've googled and found both methods, and tried
variations on the statements, but nothing works.
Need help,
TIA,
David