Drobna modyfikacja poprzednich regułek. Oczywiście zmiany podyktowane przykrymi doświadczeniami 😉

 

<IfModule rewrite_module>
RewriteEngine on
RewriteCond %{REQUEST_URI} -d
RewriteRule .* /index.php?dir=$0
</IfModule>

# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]

 

<FilesMatch „wp-config.*\.php|\.htaccess|readme\.html”>
Order allow,deny
Deny from all
</FilesMatch>

<Files wp-login.php>
AuthType Basic
AuthGroupFile /dev/null
AuthName „stop”
AuthUserFile /password (tutaj haslo dostepu do panelu logowania)
require valid-user
</Files>

<Files xmlrpc.php>
Order deny,allow
Deny from all
</Files>

RewriteCond %{QUERY_STRING} author=\d
RewriteRule ^ /? [L,R=301]

<Files ~ „^.*\.([Hh][Tt][Aa])”>
order allow,deny
deny from all
satisfy all
</files>

<Files wp-content/uploads/^(*.jpeg|*.jpg|*.png|*.gif|*.pdf)>
order deny,allow
deny from all
</Files>

<files wp-config.php>
order allow,deny
deny from all
</files>

<Files wp-content/uploads/*.php>
deny from all
</Files>