Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#40762 new enhancement

Login: add canonical admin shorthand URL for login.php

Reported by: lancewillett's profile lancewillett Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 4.8
Component: Login and Registration Keywords: has-patch
Focuses: Cc:


Users could type login.php by accident when trying to access their admin dashboard because wp-login.php is a known URL and shorthand, and either they don't remember or get it wrong.

Let's make that more friendly.

Right now WordPress treats it as a 404, and tries to redirect it to a valid permalink if it's available.

It'd be more user-friendly to automatically send to login page, or admin if logged in.

Attachments (1)

40762.diff (406 bytes) - added by lancewillett 6 years ago.

Download all attachments as: .zip

Change History (2)

6 years ago

#1 @subrataemfluence
6 years ago

Good suggestion!

Your patch works fine as far as taking user to login page with login.php.

However, the problem I found (not in your code, it works perfectly fine) is WordPress takes me to login page even if I am already logged in! I should rather be on some other page but of course not on login page.

Added a proposed patch at #40768 to prevent this.

Note: See TracTickets for help on using tickets.