[wp-hackers] redirects for /admin
dyordan1 at ramapo.edu
Wed Mar 6 18:09:55 UTC 2013
Despite the risk of being ostracized here's my suggestion:
Have a physical file on the server, say admin/index.php (any file that would be treated as index is fine, pick a language)
Have a 301 Moved Permanently in that file
Also don't forget to actually redirect it
Flat files always(?) take precedence over Wordpress so it should be fine. Here's a PHP code sample for the content:
header("HTTP/1.1 301 Moved Permanently");
On Wed, 6 Mar 2013, at 12:59 PM, Kirk Wight wrote:
> The redirect is happening through a redirect tool on WP Engine, which I
> thought would be at the server level; I'll dig deeper with them.
> Still, out of curiosity, what is the best way to filter or remove that
> /admin redirect? I'm combing through rewrite.php and filters now.
> On 6 March 2013 12:26, Andrew Nacin <wp at andrewnacin.com> wrote:
>> On Wed, Mar 6, 2013 at 12:21 PM, Kirk Wight <kwight at kwight.ca> wrote:
>>> I'm working with a client that needs a redirect in our top level install
>>> directory for /admin, pointing to an external tool. This is causing
>>> problems for anyone logged in, or doing anything at /wp-admin.
>>> I'm having trouble finding info on it, but isn't there a built-in
>>> redirect for /admin that could be causing my problems? What would be the
>>> best way to disable it?
>> There is a redirect for /admin built into WordPress, but I doubt it is
>> causing your problem as it happens in PHP. If you do a redirect for /admin
>> at the server level (Apache, nginx), you'll avoid it entirely.
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers