You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by zeek <ze...@sparklehouse.com> on 2003/06/04 15:21:59 UTC

[users@httpd] Rewrite/Redirect SSL Madness


Greetings,

I've read quite a few things regarding my question here, including
http://www.engelschall.com/pw/apache/rewriteguide/, but nothing has been
satisfactory. The issue is more complicated than what I'm able to deal
with --and it's sensitive so I don't want to continue with my trial/error
hacking, resulting in an unsecure setup.

Q: How to make a directory, outside of DocumentRoot, remap to a URI accessible
_only_ via SSL. Ensure also that if the request lands within the path (ie,
http://example.com/webmail/path/to/some/folder.php) this is redirected to https.

I've tried a number of combinations using Redirect*, Alias, and Rewrite*
directives but this results in non-ssl returns, loops, or 404s. Order has also
been tried but if this is broken or reconfigured for whatever reason, it will
all go south.

Here's the config (at this point). Any suggestions would be greatly appreciated.

# Alias /webmail        /usr/share/squirrelmail/
# Alias /sqmail /usr/share/squirrelmail/

# <Directory /usr/share/squirrelmail>

#        Options Indexes SymLinksIfOwnerMatch
#        AllowOverride None
#        order allow,deny
#        allow from all

# RewriteEngine on
# RewriteCond %{SERVER_PORT} !=443
# RewriteRule (/webmail.*) https://example.com$1 [R,L,NS]
# RewriteRule (/sqmail.*) https://example.com$1 [R,L,NS]
# </Directory>




Cheers,
-zeek



---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org