• Resolved do77

    (@do77)


    Hi,

    so I created a custom login page for authors to log in my blog. The problem is that they are still able to get to the normal login-page when they type in mydomain.com/wp-admin. How do I redirect people that try to go on this site automatically to my custom login page?

    do77

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    RewriteEngine On
    RewriteBase /
    ##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS
    ##### Michi’s code is BELOW #####
    RewriteCond %{REQUEST_URI} wp-admin/
    RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
    RewriteRule .*\.php [F,L]
    RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
    RewriteRule ^ADMINFOLDER/(.*) wp-admin/$1?%{QUERY_STRING}&YOURSECRETWORDHERE [L]
    ##### Michi’s code is ABOVE #####
    ##### BELOW THIS POINT IS ALREADY INSERTED BY WORD PRESS
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Change YOURSECRETWORDHERE to something else. It can be any word you want. Just make sure it’s unique and somewhat long. Make it, like, your pets name or something random. Read this post to understand why this matters.

    Change ADMINFOLDER to the new folder name you want. Letters, numbers, underscores, and dashes only. That ^ in front of it is on purpose. Don’t delete that.

    Thanks,

    Shane G.

    Thread Starter do77

    (@do77)

    I used the theme-my-login plugin and it works nice. Thank you Shane G though!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I block users that try to go on “domain.com/wp-admin”’ is closed to new replies.