Skip to content

Commit

Permalink
Allow to enable HSTS easily on my server
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 authored Apr 7, 2019
1 parent 5f50212 commit 1e2f3ff
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

RewriteEngine On

# Uncomment if HTTPS is enabled. FYI, HSTS header increases security of your website & SEO
# <IfModule mod_headers.c>
# Header set Strict-Transport-Security "max-age=31536000; preload" env=HTTPS
# </IfModule>

# Remove www subdomain in the URL
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

# Force the URL to be https (only if you have an SSL certificate)
# RewriteCond %{SERVER_PORT} 80
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

# Redirect trailing slashes if it isn't a folder
RewriteCond %{REQUEST_FILENAME} !-d
Expand Down

0 comments on commit 1e2f3ff

Please sign in to comment.