Chris wrote:
Hi guys,

Does anyone know of a simple way (maybe using .htaccess?) to force all files
within a directory to be accessed only with secure https protocol (Red Hat
7.2 + Apache)?  Ie: even if someone overwrites the URL with http, have it
automatically redirect to the same URL but with https prefix...?

RewriteEngine on


RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{PATH_INFO} ^$
RewriteRule ^(.*) https://www.example.com/secure/ [L]

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*) https://www.example.com/secure/$1



--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to