My site is hosted with 1&1 in Germany and they have just done a relocation/server move. They warned of some down time but I discovered my sites were suddenly all returning a 500 code.
After examining the .htaccess files, deleting and adding back sections at a time, I discovered that remarking this section restored access to the sites.
It always worked before today, so I am presuming something in the new 1&1 hosting setup makes it no longer acceptable. Can anyone give me any clues please?
I think the code was originally to block certain types of referrer that had a malformed referrer (with a / before the domain name?) the but I can't remember the full details.
Something akin to this I think
[
drupal.org...]
This is the bit of .htaccess code the new system doesn't like
***************************************
# Redirections for specific visitors
# Redirect if hostname is present in requested
# URL-path (with several variations) and matches my domain
RewriteCond $2 ^(www\.)?mydomain\.org.uk$ [NC]
RewriteRule ^/?(https?://)?([^.:/]+(\.[^.:/]+)+)\.?(:[0-9]+)?(/.*)?$ [
mydomain.org.uk...] [R=301,L]
# Else return 403 if someone else's domain is in there
RewriteRule ^/?(https?://)?[^.:/]+(\.[^.:/]+)+) - [F]
*****************************************
My host gave me these notes prior to the move.
*************************************
Apart from better performance and more security, the migration to a Linux operating environment (based on Debian Squeeze/6.0) specifically adapted to the needs of 1&1 and its customers also includes the upgrade of the following components:
Apache 2.2
[
apache.org...]
Please note that the migration has resulted in a number of changes in the runtime configuration. For example, the instruction 'IndexOptions FancyIndex' now takes you to the function that used to be available under the obsolete 'FancyIndex On'.
[
httpd.apache.org...]
If you are using very old scripts or software, please note that after a redirect by Apache, certain internal variables, such as 'REMOTE_USER', will henceforth only be available as 'REDIRECT_REMOTE_USER'.
************************************
I've read [
httpd.apache.org...]
but can't see anything obvious there - although most of it is above my head.
Many thanks in advance for any replies.
NB - I'm NOT well versed in writing Apache .htaccess files.