Forums

Custom Login Page - Redirect (2 posts)

  1. cus003
    Member
    Posted 1 year ago #

    Hi all!

    I'll be honest, apache isn't my strong point.

    I have created a custom login page for WordPress. That's a custom page, not a custom URL to point to the default page. Obviously, I don't want people to visit wp-login.php, as the design is the default one. All my links point to /login (my new page) rather than wp-login.php, but if some tech-savvy user types it in, they will get the default page - not good.

    All the rewrite help for this on the internet seems to involve having only a custom URL for the login page, not a whole new page alltogether.

    What rewrite rule(s) do I need to redirect all wp-login.php (regardless of trailing slash and queries) to "login" (with a trailing slash and queries).

    Thanks,
    Marcus

  2. cus003
    Member
    Posted 1 year ago #

    It's ok, I solved it. I used a filter on "site_url" to redirect any requests within WordPress, then used a simple redirect rule in my htaccess to redirect. While this won't keep the query string, the query string will never be added, because i've taken care of this within WordPress.

    I probably couldn't figure it out yesterday because it was fairly late.

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.