<p>It turned out that <code>RewriteBase /</code> needed to be added to the htaccess</p>

CC BY-SA 4.0
2022-10-18T20:44:53.597Z
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.
mike_freegan
CC BY-SA 4.0
2022-12-29T15:19:35.890Z
Thanks, past me! You saved me.
mike_freegan
CC BY-SA 4.0
2020-09-03T19:31:42.273Z
2020-09-03T19:31:42.273Z
Andrew
<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>

<error-message><server><htaccess>
500 Internal Server Error when accessing admin
# 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.  

---

