Answers.Body: <p>Solved, I left an .htaccess file in root. It wasn't in local server neither, but It seems it was some config in virtual host or something like that to solve it. Once I find this .htaccess in other craft project, was solved ;)</p>
  <p>Don't forget your .htaccess in root!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-28T07:19:57.780Z
Answers.LastActivityDate: 2020-10-28T07:19:57.780Z
Answers.UserDisplayName: Manuel González
Body: <p>I've migrated a website with CraftCms 2 from local to a pre-production server. Everything is working fine but, I don't know why, I only can go to the admin panel with locale code before /admin. I mean, if I write domain.com/admin, it doesn't work. But if I write domain.com/es/admin it works. And this don't happen in local server, only in pre-production.</p>
  <p>I get message &quot;Not Found. The requested URL /admin was not found on this server.&quot; Instead of a 404 from my webpage.</p>
  <p>It works fine in others projects under craft with the same structure and, as I said, in local server works fine too. In root I have:</p>
  <ul>
  <li>assets/</li>
  <li>craft/</li>
  <li>en/</li>
  <li>va/</li>
  <li>es/</li>
  <li>index.php</li>
  </ul>
  <p>Any idea? Thanks.</p>
  
Tags: <localization><error><admin><craft2><dashboard>
Title: Admin panel not working without language code
ThreadText: # Admin panel not working without language code
  
  (Asked by: username_0 on 2020-10-27)
  
  I've migrated a website with CraftCms 2 from local to a pre-production server. Everything is working fine but, I don't know why, I only can go to the admin panel with locale code before /admin. I mean, if I write domain.com/admin, it doesn't work. But if I write domain.com/es/admin it works. And this don't happen in local server, only in pre-production.
  
  I get message "Not Found. The requested URL /admin was not found on this server." Instead of a 404 from my webpage.
  
  It works fine in others projects under craft with the same structure and, as I said, in local server works fine too. In root I have:
  
  * assets/
  * craft/
  * en/
  * va/
  * es/
  * index.php
  
  Any idea? Thanks.
  
  **Tags:** localization, error, admin, craft2, dashboard
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-10-28. Score: 2
  
  Solved, I left an .htaccess file in root. It wasn't in local server neither, but It seems it was some config in virtual host or something like that to solve it. Once I find this .htaccess in other craft project, was solved ;)
  
  Don't forget your .htaccess in root!
  
  
  ---
  
  