Nginx /wp-admin/ Rewrites


I recently moved all my data from a VPS to a new Dedicated box running Nginx. I have followed DH’s nginx wiki in an attempt to set up some url rewrites. I am running wordpress and what I want to do is, set up a rewrite to change to In my attempt so far I have setup a wordpress.conf file located: /home/myuser/nginx/ in this I have the following rewrites:

location ~* /login/ {
rewrite ^/login/(.)? /wp-login/$1;
rewrite ^/login/(.
).php$ /wp-admin/$1.php last;
rewrite ^/login/$ /wp-admin/index.php last;

I then restarted my box to ensure that nginx updated but when the site came back online, the rewrites didn’t seem to take effect.

Do you guys have any idea why these are not working?


However, if that doesn’t help, there are alternative ways to do this here without involving nginx configs: