Body: <p>I'm having trouble logging in to the admin panel if I set <code>omitScriptNameInUrls</code> to true in the general config file. The login works well on a subdomain, which is odd. It seems that asset loading is messed up with that setting. Random files seems to be broken with an 500 error.</p>
  
  <p>Tested in incognito mode, no luck.</p>
  
  <p><a href="https://i.sstatic.net/YORiR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YORiR.png" alt="Js error"></a></p>
  
  <p>I've seen other admin login error questions here, but I had no luck with them. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-18T17:20:22.057Z
Comments.Text: Lots of potential causes and questions. 1) Is this Apache or nginx? 2) If Apache, does your server support PATH_INFO? 3) What domain(s) are you testing with? You mention it works well on a subdomain. 4) What's the underlying 500 error? It'll be logged in either `craft/storage/runtime/logs` or your web server's error logs depending on where it originated from.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-18T17:25:24.587Z
Comments.Text: 1) Apache
  2) Not sure, will check. How could it be a problem?
  3) .beta subdomain, I don't understand what's different.
  4) I checked logs, but no relevant info there :( and other server error logs have no info either, this adds to the mystery. But maybe forget 500 errors, I've seen them locally not on the live server. 
  
  On the server the Garnish error is consistent.
Comments.UserDisplayName: Tibor Szasz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-18T17:46:55.497Z
Comments.Text: So beta.domain.com works, but domain.com doesn't? If you remove `omitScriptNameInUrls` everything works fine?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-18T18:11:11.950Z
Comments.Text: Yes, if I set it to false, login fails because a script is not loaded.
Comments.UserDisplayName: Tibor Szasz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-18T18:15:17.627Z
Comments.Text: It might be unrelated, but I see another weird thing I feel I should mention: http://imgur.com/GwH5dYT
  Locally I see random asset failures when I refresh the CP. Previous 3 project in craft on the same machine with the same config had no issues. I compared the directories with a fully working projects, but no corrupt files seem to appear.
Comments.UserDisplayName: Tibor Szasz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-18T18:21:18.490Z
Comments.Text: Asset failures are caught. It was caused by an addition to the index.php where we tried to load a `.env` file. I remove it server side to see if it makes a difference. The funny thing is that it causes a lot more trouble on my windows machine than on the Amazon instance.
Comments.UserDisplayName: Tibor Szasz
Tags: <admin><login><bug>
Title: omitScriptNameInUrls breaks admin asset loading
ThreadText: # omitScriptNameInUrls breaks admin asset loading
  
  (Asked by: username_0 on 2016-04-18)
  
  I'm having trouble logging in to the admin panel if I set `omitScriptNameInUrls` to true in the general config file. The login works well on a subdomain, which is odd. It seems that asset loading is messed up with that setting. Random files seems to be broken with an 500 error.
  
  Tested in incognito mode, no luck.
  
  [![Js error](https://i.sstatic.net/YORiR.png)](https://i.sstatic.net/YORiR.png)
  
  I've seen other admin login error questions here, but I had no luck with them.
  
  **Tags:** admin, login, bug
  
  > **Comments:**
  > **username_1**: Lots of potential causes and questions. 1) Is this Apache or nginx? 2) If Apache, does your server support PATH_INFO? 3) What domain(s) are you testing with? You mention it works well on a subdomain. 4) What's the underlying 500 error? It'll be logged in either `craft/storage/runtime/logs` or your web server's error logs depending on where it originated from.  
  > **username_0**: 1) Apache 2) Not sure, will check. How could it be a problem? 3) .beta subdomain, I don't understand what's different. 4) I checked logs, but no relevant info there :( and other server error logs have no info either, this adds to the mystery. But maybe forget 500 errors, I've seen them locally not on the live server.   On the server the Garnish error is consistent.  
  > **username_1**: So beta.domain.com works, but domain.com doesn't? If you remove `omitScriptNameInUrls` everything works fine?  
  > **username_0**: Yes, if I set it to false, login fails because a script is not loaded.  
  > **username_0**: It might be unrelated, but I see another weird thing I feel I should mention: http://imgur.com/GwH5dYT Locally I see random asset failures when I refresh the CP. Previous 3 project in craft on the same machine with the same config had no issues. I compared the directories with a fully working projects, but no corrupt files seem to appear.  
  > **username_0**: Asset failures are caught. It was caused by an addition to the index.php where we tried to load a `.env` file. I remove it server side to see if it makes a difference. The funny thing is that it causes a lot more trouble on my windows machine than on the Amazon instance.  
  
  ---
  
  ## 0 answers
  
  