Created
August 4, 2016 17:17
-
-
Save jennimckinnon/e3cf9cacd310657035c903d22ef531a8 to your computer and use it in GitHub Desktop.
Rename WordPress login page. Replace "key=123". Based on the code from the WCEU 2016 talk by Maurizio Pelizzone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN Hide login page | |
RewriteRule ^mylogin$ https://%{SERVER_NAME}/wp-login.php?key=123&redirect_to=https://%{SERVER_NAME}/wp-admin/index.php [L] | |
RewriteCond %{HTTP_REFERER} !^https://%{SERVER_NAME}/wp-admin | |
RewriteCond %{HTTP_REFERER} !^https://%{SERVER_NAME}/wp-login.php | |
RewriteCond %{HTTP_REFERER} !^https://%{SERVER_NAME}/login | |
RewriteCond %{QUERY_STRING} !^key=123 | |
RewriteCond %{QUERY_STRING} !^action=logout | |
RewriteCond %{QUERY_STRING} !^action=lostpassword | |
RewriteCond %{REQUEST_METHOD} !POST | |
# END Hide login page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment