How can i do this:
Whenever visitors open the login page (wp-login.php), they will be redirected to the mainpage. Only the admin (me) can view the page to login.
I am doing this to protect my wp sites. Is there any better way to protect WP login page?
You can make it so no one can register by clicking off “Anyone can register” in your Admin.
Furthermore, you can choose a really good password, install a login lockdown plugin and enable logins over https. In most cases this is secure enough.
If your really paranoid you can allow access to only your IP by using .htaccess.
To do a re-direct you can try something like this in your .htaccess.