Answers.Body: <p>I checked the http headers, and apparently my server was redirecting to a 404 page because the favicon.ico was missing. </p>
  
  <p>As soon as I uploaded one it all worked fine again. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-18T11:22:47.940Z
Answers.LastActivityDate: 2016-01-18T11:22:47.940Z
Answers.UserDisplayName: Alex Lillo
Body: <p>I have recently migrated an intranet to its production environment, and the requireLogin is misbehaving:</p>
  
  <ol>
  <li>I'd go to intranet.example.com/</li>
  <li>Log in with my details</li>
  <li>Craft will redirect me to <strong>intranet.example.com/404.shtml</strong>, showing 'Layout file - This content should not be seen.'
  
  <ul>
  <li>this page doesn't exist, and I can't find any reference to 404.shtml on any page. </li>
  </ul></li>
  <li>If I reload intranet.example.com/, it will show me the homepage, logged in. It works fine after that</li>
  <li>I can log out and in again, it will work fine. I need to log out, close the browser and log in again to replicate the error</li>
  </ol>
  
  <p>I have no redirects or have changed anything on the Craft config. Basically is a default 2.5 installation with new templates.</p>
  
  <p>It works fine both locally (MAMP) and on my dev environment, but not on the server I just migrated it to. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-13T17:23:47.457Z
Comments.Text: After reading [this issue with old PHP](https://craftcms.stackexchange.com/questions/6735/admin-entries-404ing?rq=1) I checked my server, and is running PHP 5.5, with 128M of memory and safe mode disabled.
Comments.UserDisplayName: Alex Lillo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-13T20:27:31.727Z
Comments.Text: 404.shtml isn't a Craft file... I'm guessing your host/web server is redirect to it (for whatever reason)?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-14T09:13:29.890Z
Comments.Text: @BradBell ok I was guessing that too, because I couldn't find that file! I'll ask them about it.
Comments.UserDisplayName: Alex Lillo
Tags: <login><404>
Title: Successful login with 'requireLogin' redirects to 404.shtml
ThreadText: # Successful login with 'requireLogin' redirects to 404.shtml
  
  (Asked by: username_0 on 2016-01-13)
  
  I have recently migrated an intranet to its production environment, and the requireLogin is misbehaving:
  
  1. I'd go to intranet.example.com/
  2. Log in with my details
  3. Craft will redirect me to **intranet.example.com/404.shtml**, showing 'Layout file - This content should not be seen.'
     * this page doesn't exist, and I can't find any reference to 404.shtml on any page.
  4. If I reload intranet.example.com/, it will show me the homepage, logged in. It works fine after that
  5. I can log out and in again, it will work fine. I need to log out, close the browser and log in again to replicate the error
  
  I have no redirects or have changed anything on the Craft config. Basically is a default 2.5 installation with new templates.
  
  It works fine both locally (MAMP) and on my dev environment, but not on the server I just migrated it to.
  
  **Tags:** login, 404
  
  > **Comments:**
  > **username_0**: After reading [this issue with old PHP](https://craftcms.stackexchange.com/questions/6735/admin-entries-404ing?rq=1) I checked my server, and is running PHP 5.5, with 128M of memory and safe mode disabled.  
  > **username_1**: 404.shtml isn't a Craft file... I'm guessing your host/web server is redirect to it (for whatever reason)?  
  > **username_0**: @username_1 ok I was guessing that too, because I couldn't find that file! I'll ask them about it.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-01-18. Score: 2 | Accepted answer
  
  I checked the http headers, and apparently my server was redirecting to a 404 page because the favicon.ico was missing.
  
  As soon as I uploaded one it all worked fine again.
  
  
  ---
  
  