Page is a not externally linkable
gapao99 - 10:44 pm on Apr 17, 2011 (gmt 0)
Hi. Thanks for you answers.
Sorry, i didn't clarify the problem. So let's do it.
When I enter the following URL, for example
mysite/admin
I want it to access mysite/wp-admin/index.php, what I already acomplished with the rewrite rule
RewriteRule ^admin/(.*)$ wp-admin/$1 [QSA,L]
That is already nice. I can change the wordpress menus via plugin and make them to point to friendly URLs, like mysite.com/admin/newpost (which appoint to mysite.com/wp-admin/edit.php).
That's working, perfectly.
BUT...
there's a lot of links inside wordpress, all of them with the href 'wp-admin/something.php', and would be insane change all these URLs, so i figured out to make the rewrite:
RewriteCond %{REQUEST_URI} wp-admin/(.*)$
RewriteRule wp-admin/(.*)$ admin/$1 [R=301]
RewriteRule ^/(.*)$ wp-admin/$1 [QSA,L]
that works ALMOST fine, except by the fact that this rules and the rule above together create a loop.
I think the problem can be solved via THE_REQUEST if I could detect if a request is a REDIRECT. So, i could do the following rewrite and avoid the loop:
RewriteCond %{THE_REQUEST} "IS NOT A REDIRECT"
RewriteRule ^admin/(.*)$ wp-admin/$1 [QSA,L]
where "IS NOT A REDIRECT" is something i didnt figured out yet :(
thanks for your time, and thanks if could give any clue about what to do here...
my best