Created
December 3, 2015 10:08
-
-
Save krafit/9a5a9a4f8952effa7644 to your computer and use it in GitHub Desktop.
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
# protect the htaccess file | |
<files .htaccess> | |
order allow,deny | |
deny from all | |
</files> | |
# protect the log file | |
<FilesMatch "\.(log|txt)$"> | |
Order Allow,Deny | |
Deny from all | |
</FilesMatch> | |
# protect wp-config.php | |
<files wp-config.php> | |
order allow,deny | |
deny from all | |
</files> | |
# protect readme.html | |
<files readme.html> | |
order allow,deny | |
deny from all | |
</files> | |
# protect liesmich.html | |
<files liesmich.html> | |
order allow,deny | |
deny from all | |
</files> | |
# protect robots.txt | |
<FilesMatch "robots\.txt"> | |
Header set X-Robots-Tag "noindex" | |
</FilesMatch> | |
# protect xml-rpc.php | |
<IfModule mod_setenvif.c> | |
<Files xmlrpc.php> | |
Order Deny,Allow | |
Deny from All | |
Allow from env=allowed | |
</Files> | |
</IfModule> | |
# disable the server signature | |
ServerSignature Off | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment