Ok, I've done some troubleshooting, found out if Anti-XSS attack (Base directory limit)(open_basedir) is on its not getting redirected.
But when that's turned on I get an error Warning: Unknown: open_basedir restriction in effect.
This is a Wordpress error, which I installed manually since one click wasn't working for some reason. To fix this error it was mentioned to turn off Anti-Xss attack option. So that's the update.
Help would be appreciated.
Edit - domain.com/wp-login.php goes to the login page correctly, but still domain.com goes to subdomain.