Custom directory exclude from protected admin
-
Hello, during some special task of having password meter at front site, that involves requests from wp-admin/js/ – i have to make adjustment of the WP Hide plugin’ output of server rules in the wp root directory htaccess.
I’ve contacted Support email and got partly response, that as the free version user i understand, so here is the set of rules and modifications(2) with the comments, that could be further improved to finally have possibility of custom directory exclusion from the wp-admin access restrictions safety rules://exampleadmin custom wp-admin directory name
//wp-admin/js/ directory to exclude from rewriting rulesRewriteCond %{REQUEST_URI} /exampleadmin$ RewriteRule ^(.*)$ /exampleadmin/ [R=301,L] RewriteCond %{REQUEST_URI} !^/wp-admin/js/?$ //confirmed with Support ok RewriteRule ^exampleadmin(.*) /wp-admin$1 [L,QSA] RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^wp-admin(.+) /index.php?wph-throw-404 [L] //to do: reverting wp-admin access on the special directory request not ok, file is accessible but also wp-admin direct access instead of 404 <If "%{REQUEST_URI} = '/wp-admin/js/password-strength-meter.js'"> RewriteRule ^wp-admin(.*) /exampleadmin$1 [L,QSA] </If>
Regards
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom directory exclude from protected admin’ is closed to new replies.