Home › Forums › Back End › CSP with SSL redirect via mod_rewrite › Reply To: CSP with SSL redirect via mod_rewrite
March 10, 2016 at 1:45 am
#238893
Anoop Gupta
Participant
You can try this code, It should be helpful.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_USER_AGENT} ^(.+)$
RewriteCond %{SERVER_NAME} ^domain.com$
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Header add Strict-Transport-Security “max-age=300”
</IfModule>
Thanks
Anoop Gupta
https://www.zeemo.com.au/