步骤:
将常量添加到wp配置中。php
define(\'WP_ADMIN_DIR\', \'secret-folder\');
define( \'ADMIN_COOKIE_PATH\', SITECOOKIEPATH . WP_ADMIN_DIR);
将下面的过滤器添加到函数中。php
add_filter(\'site_url\', \'wpadmin_filter\', 10, 3);
function wpadmin_filter( $url, $path, $orig_scheme ) {
$old = array( "/(wp-admin)/");
$admin_dir = WP_ADMIN_DIR;
$new = array($admin_dir);
return preg_replace( $old, $new, $url, 1);
}
将下面的行添加到。htaccess文件
RewriteRule ^securelogin/(.*) wp-admin/$1?%{QUERY_STRING} [L]
完成…!!!
现在,您的管理员URL如下所示:http://www.example.com/securelogin/
注:put"/"
之后securelogin