Answers.Body: <p>It turned out that <code>RewriteBase /</code> needed to be added to the htaccess</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-18T20:44:53.597Z
Answers.Text: Hey, future me. Next time this happens when copying to production, this is the answer. The htaccess is in the sitename/web directory, not in the root, so you overwrote it when uploading your theme (again). Make sure it's in the gitignore.
Answers.UserDisplayName: mike_freegan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-29T15:19:35.890Z
Answers.Text: Thanks, past me! You saved me.
Answers.UserDisplayName: mike_freegan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-03T19:31:42.273Z
Answers.LastActivityDate: 2020-09-03T19:31:42.273Z
Answers.UserDisplayName: Andrew
Body: <p>I just get a server error when trying to access /admin, or any other URL. This is a completely new installation on a staging server. The 'Welcome' page shows OK.</p>
  <p>I'm guessing this is a .htaccess problem, because if I remove it and change 'omitScriptNameInUrls' to false the login page shows - but unstyled. If I login I get 400 bad request.</p>
  <p>I've looked in the web.log, but can't see anything to help there.</p>
  <p>The hosting company is IONOS (1&amp;1).</p>
  <p>Any ideas?</p>
  
Tags: <error-message><server><htaccess>
Title: 500 Internal Server Error when accessing admin
ThreadText: # 500 Internal Server Error when accessing admin
  
  (Asked by: username_0 on 2020-09-03)
  
  I just get a server error when trying to access /admin, or any other URL. This is a completely new installation on a staging server. The 'Welcome' page shows OK.
  
  I'm guessing this is a .htaccess problem, because if I remove it and change 'omitScriptNameInUrls' to false the login page shows - but unstyled. If I login I get 400 bad request.
  
  I've looked in the web.log, but can't see anything to help there.
  
  The hosting company is IONOS (1&1).
  
  Any ideas?
  
  **Tags:** error-message, server, htaccess
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-09-03. Score: 4
  
  It turned out that `RewriteBase /` needed to be added to the htaccess
  
  > **Comments:**
  > **username_1**: Hey, future me. Next time this happens when copying to production, this is the answer. The htaccess is in the sitename/web directory, not in the root, so you overwrote it when uploading your theme (again). Make sure it's in the gitignore.  
  > **username_1**: Thanks, past me! You saved me.  
  
  ---
  
  