Sharing code. See Headers, SQL, WP Includes and Wp Admin and Uploads. If you want, you can add these in your Next Update.
Protect wp-admin directory, .htaccess in wp-admin:
# First protect this htaccess
<files .htaccess>
order allow,deny
deny from all
</files>
<FilesMatch "\.(css|js|jpg|jpeg|gif|png)$">
Order Allow,Deny
Allow from All
Satisfy Any
</FilesMatch>
<Files admin-ajax.php>
Order Allow,Deny
Allow from All
Satisfy Any
</Files>
# Protect wp-admin by IP Address
order deny,allow
allow from 00.0.00.00
deny from all
Protect uploads with this, .htaccess in uploads directory:
# First protect this htaccess
<files .htaccess>
order allow,deny
deny from all
</files>
# Secure uploads directory
<Files ~ ".*\..*">
Order Allow,Deny
Deny from all
</Files>
<FilesMatch "\.(jpg|jpeg|jpe|gif|png|pdf|mp4|mpeg|mp3)$">
Order Deny,Allow
Allow from all
</FilesMatch>
This code for uploads is util if you are using buddypress or bbpress + rtmedia (or whatever media uploader for users).
-
This reply was modified 8 years, 2 months ago by
livingflame.
-
This reply was modified 8 years, 2 months ago by
livingflame.