1&1 shared Linux hosting Internal Server Error [solved]

In the .htaccess file I changed the following line:
RewriteRule .* index.php [L]
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
to get it to run.

(to the .htaccess I also added the line
AddType x-mapp-php6 .php
but, once it worked, I didn’t bother testing if this line actually contributed to the fix)

All credit to info from a search result to my googled query “1&1 internal server error”, found at https://www.drupal.org/node/232773

I think the x-mapp-php6 reference was the one you needed as that seems to be how 1&1 enable PHP 5.4. Would you mind trying that alone and reverting the index.php Rewrite? I just would like to isolate exactly what the fix was.


Is what I found regarding that call BTW.


As you requested, I have tried reverting to:
RewriteRule .* index.php [L] but I got the following error on every page other than the home page:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

How about:

RewriteRule ^(.*)$ index.php [L]


No, RewriteRule ^(.*)$ index.php [L] didn’t work. But I fiddled a bit and this one did work:
RewriteRule .* /index.php [L]

I believe that the issue is rewrite base not being the current directory:

RewriteBase /grav

should work, where you just replace path with your own.

@ MatiasGriese - As I mentioned above, the site is working. I think you have worked out that I am hosting this on a sub-directory within my 1&1 space, not the root directory (which has our original site). I did in fact follow the troubleshooting instructions to prevent “File not found”, thinking this might be necessary, at http://learn.getgrav.org/troubleshooting/page-not-found and so I have already put in the correct RewriteBase /grav . But this didn’t do anything for the Internal Server Error that I was seeing.

So actually, since you mention it, I have just tried reverting back the line to a comment # RewriteBase / and indeed the site is still working.

It’s very strange because I’ve researched this and all the Joomla/Drupal/Wordpress forums say that RewriteBase /subdir should be all you need to change. Our .htaccess is actually very similar to these. The /index.php also seems to work, but most recommendations are for the RewriteBase.

I’m glad your working, but still confused why the RewriteBase /subdir didn’t work for you. Oh well!

what is the solution to this problem? i have a similar one.

for 1&1 the solution to this problem is as follows:


RewriteRule .* index.php [L]


RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

and below add these two lines:

AddType x-mapp-php5 .php
AddType x-mapp-php6 .php

this way i’ve done it.

If someone with a 1&1 account could copy the SiteGround or Arvixe document from the docs, and create a 1&1 document, I would gladly credit them and add it to the docs. It could really help other people out.

I would do it but don’t have an account to test/verify the steps.


FYI, the 1and1 control panel allows setting the version of php for each subdomain (under php settings).

This maybe easier than editing .htaccess. If not set, the default seems to vary.