anantshri/wp-security/master/htaccess/block_extra_theme_access.htaccess - Htaccess File

anantshri/wp-security/master/htaccess/block_extra_theme_access.htaccess

## Deny Access to All But the Active Theme
## Whitelist the active theme. Change "active-theme" to the name of your active theme's directory
## Ref : http://journalxtra.com/websiteadvice/wordpress-security-hardening-htaccess-rules/
RewriteCond %{REQUEST_URI} !.*/wp-content/themes/active-theme/.* [NC]
RewriteCond %{THE_REQUEST} !.*/wp-content/themes/active-theme/.* [NC]
## Block access to any directory or document not in the active-theme's directory.
RewriteCond %{REQUEST_URI} ^.*/wp-content/themes/.* [NC,OR]
RewriteCond %{THE_REQUEST} ^.*/wp-content/themes/.* [NC]
RewriteRule .* - [F,L]

On Github License

Files

Download PDF of Htaccess file
REQUEST_URI, THE_REQUEST

Comments

Apache