Skip to content

Instantly share code, notes, and snippets.

@jafstar
Last active December 10, 2015 21:38
Show Gist options
  • Save jafstar/4496474 to your computer and use it in GitHub Desktop.
Save jafstar/4496474 to your computer and use it in GitHub Desktop.
Options +FollowSymLinks All -Indexes -MultiViews
# 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>
# END WordPress
#Securing wp-config.php
<files wp-config.php>
order allow,deny
deny from all
</files>
# Disable ETags
<IfModule mod_header.c>
Header Unset ETag
FileETag none
</IfModule>
#Gzip
<Ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</Ifmodule>
# Default expires header if none specified (stay in browser cache for 7 days)
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A300
</IfModule>
#Protect this file
<files .htaccess>
order allow,deny
deny from all
</files>
#http://codex.wordpress.org/Hardening_WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment