How to change wordpress default login.php url using nginx rewrite rules? -


i trying change wordpress default logon url http://abc/wp-login.php http://abc/backend using rewrite rule nginx not working me. please check below code.

location /backend {   rewrite ^/backend/?$ /wp-login.php break; } 

and wordpress function is:

add_action('init', 'init_login_rules' );  function init_login_rules() {      $newurl='backend';     add_rewrite_rule( $newurl.'/?$', 'wp-login.php', 'top' );  } 

please me.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -