Hi Brian,

A very simple solution that works on any type of webserver is to replace the standard 403.4 "SSL Required" error document with some sort of automatic redirect code. In apache.conf
you would put e.g.

 ErrorDocument 403 /error/ssl_auto_redirect.php

In "ssl_auto_redirect.php" you determine the requested resource with getenv('REQUEST_URI') and what else might be needed, slash "https://"; in front and do a location('<url_with_https_in_front>');

Very simple and it works. Haven't done it in apache yet, but used to do it in IIS. Happy coding!

Mads Rosendahl


Brian Candler wrote:

I would like users to be able to put an incantation in their .htaccess files
which says: "if this directory was not accessed via SSL, then issue a
redirect to https://....";

I know about SSLRequireSSL, but that just rejects the request.

Is there a way to do this short of using mod_rewrite? I am using Apache 1.3
and mod_ssl.

Thanks,

Brian.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to