Cannot go to site URL while logged in without index in URL For some reason I can no longer go to my default site URL while I am logged in.

Going to http://localhost:3001/craft-site/web/ gives me the following message in Chrome:


  ERR_TOO_MANY_REDIRECTS


Trying to refresh the site gives me this strange error message from Craft:


  HTTP 404 – Not Found – yii\web\NotFoundHttpException
  
  Template not found: $DEFAULT_SITE_URL/$DEFAULT_SITE_URL


I can still go to http://localhost:3001/craft-site/web/index while logged in and it works fine. The most interesting thing is that the file index.twig is completely empty.
For Documentation out of the comments:
'loginPath' =&gt; '/' was present in config/general.php, after removal of this line the website started working again.
Conclusion:
Don't set the Admin Backend or any other type of URL which requires a login (or is special in any way really) to &quot;/&quot; or an empty string, this can and will very likely cause major issues such as a completely non-functioning site unless index.php is in the URL (at all times).
Sidenote
I once faced a similar issue, the cpTrigger in config/general.php to an inexistant .env variable, eg $cpTr1gger, but since that wasn't present in my .env and I used getenv('cpTrigger') which returns empty strings if the requested var isn't found, it completely broke my website, similar to the above mentioned issue, it only worked with index.php in the URL.