Created
December 7, 2016 08:22
-
-
Save justjkk/47f617a2b41466e719335cce25b2df9f to your computer and use it in GitHub Desktop.
Wordpress .htaccess file with security headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
Header set X-Frame-Options SAMEORIGIN | |
Header set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" | |
Header set X-XSS-Protection "1; mode=block" | |
Header set X-Content-Type-Options nosniff | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment