for example: foobar.com/wp/edit instead of foobar.com/wp/wp-admin
How would I do that?
I’ve tried using this in htaccess but it won’t work:
##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS
##### Admin Base Rewrite #####
RewriteCond %{REQUEST_URI} wp-admin/
RewriteCond %{QUERY_STRING} !sercretword
RewriteRule .*.php [F,L]
RewriteCond %{QUERY_STRING} !secretword
RewriteRule ^secret_room/(.*) wp-admin/$1?%{QUERY_STRING}&secretword [L]
##### End Admin Base Rewrite #####
##### BELOW THIS POINT IS ALREADY INSERTED BY WORD PRESS
It was created by Michi Kono. I just can’t get it to work though.
I’m not trying to be more secure by obscurity… Its more for functionality. My site will be world editable (kind of like a wiki) but only for registered users. They will go to “/edit” instead of “/wp-admin” to edit or add content.
Thanks for the help!
NOTE: I did see this question: Can I rename the wp-admin folder?
But that doesn’t have an answer.
NOTE: Stealth Admin plugin doesn’t seem to do the trick either.
NOTE: I tried this solution: How to redirect/rewrite all /wp-login requests
But I’m not sure where in the htaccess file to place the rewrite rule with respect to the wordpress rules.
You can try the Redirection plugin, it’s great for exactly that.
EDIT
You could also for example setup a subdomain that makes a transparent redirect, as in : http://admin.mywebsite.com/ which you would redirect to your wp-admin/ folder. But then I think people would still see the wp-admin/ in all the links (on hover for ex).
Changing a URL always consists of two parts: changing the code that accepts the URLs (to make sure you get something when you go to
example.com/edit
), and changing the URLs that the code outputs in the HTML (so a link towp-admin/
will be written asedit/
).The first part is the easy part, and you can do it with Apache rewrite rules. This way you make make a request for
example.com/edit
look like it was forexample.com/wp-admin
.The second part is the hard part, and indeed requires a global search-and-replace, because it is “hard-coded” all over the place. The discussions and Trac tickets Mike linked to in his answer to the older question indicate that the core developers currently have no plans to change this, because they do not see the benefit. Indeed, your use case could also be handled in a way that does not require you to use
wp-admin
(moving everything to the front-end).As far as your htaccess place the code literally on the first line before any other comments or code added by wordpress or other plugins.
As Jan mentioned rewriting consists of two parts. So beside .htaccess you need to change the admin_url filter