First of all Override the following file :
/vendor/magento/module-customer/Model/Account/Redirect.php
- change redirect URL if login post controller gets 404 error or redirect the customer to a specific page :
private function applyRedirect($url) { /* changes start*/ $baseUrl = $this->storeManager->getStore()->getBaseUrl(); if($url == $baseUrl.'customer/account/loginPost/'){ $url = $baseUrl.'customer/account/login/'; } /* changes end*/ $this->session->setBeforeAuthUrl($url); }NOTE: Override core file in your custom module.

