I'm installing drupal 4.7.3 on my newly purchased hosting. But keep getting 500 Internal Server Error. I contact my hoster, and here's their reply :

There appears to be an issue with your .htaccess file.  Please verify that the commands in the file are supported.  For more information about supported .htaccess commands, please visit the link below.

http://support.netfirms.com/idx.php/0/068/article/How-do-I-enable-htaccess.html

and this is what I find on the support page:

The following .htaccess commands are supported:

AuthType
ErrorDocument
RewriteEngine (RewiteRule, RewriteBase, RewriteCond)
Redirect

Does this conflict with Drupal? What should I do next?

Comments

fronbow’s picture

I had a similar problem with fasthosts, there are only certain directives they allow in .htaccess files. Here was my solution, it might work for you?

.htaccess

#
# Apache/PHP/Drupal settings:
#

ErrorDocument 404 /index.php

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the prefix www.
  # you can use one of the following settings to force user to use only one option:
  #
  # If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
  # RewriteRule .* http://www.example.com/ [L,R=301]
  #
  # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
  # RewriteRule .* http://example.com/ [L,R=301]


  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  #RewriteBase /drupal

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

If it doesn't work, try taking out the IfModule start and end lines

HTH

danmurf’s picture

Hi

I'm with fasthosts, just installed Drupal 5 and hit by the error 500. I tried the code above but no dice :(

I don't understand htaccess enough to fix the problem. It's just the standard out of the box htaccess that comes with drupal 5, but it won't work with fasthosts. Does anyone have a solution, or maybe a complete working htaccess code?

Any help appreciated

Thanks

fronbow’s picture

Dan,

Try using my copy above, or alternatively remove everything out of your .htaccess except for the stuff on or after line 56, so you're left with:

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the prefix www. you
  # can use one of the following settings to force user to use only one option:
  #
  # If you want the site to be accessed WITH the www. only, adapt and
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule .* http://www.example.com/ [L,R=301]
  #
  # If you want the site to be accessed only WITHOUT the www. prefix, adapt
  # and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule .* http://example.com/ [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  #RewriteBase /drupal

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.81 2007/01/09 09:27:10 dries Exp $

HTH

danmurf’s picture

Still no joy - very odd. Are you using a standard fasthosts shared linux account?

Thanks for your help

fronbow’s picture

Hi Dan

We moved the account to evohosting.net at the earliest opportunity (and then we went the whole hog and got our own server!) as fasthosts seemed to be changing the specs of the plan without telling us. I personally don't think fasthosts or webfusion (we have another drupal site with these) are particularly good for anything other than static (or simple) websites!

If you're in the UK and are looking for a reasonable host, you should give evo a try - they're very reasonably priced; and seem to understand customer support/service; unlike the previously mentioned!

Have you tried emailling support to ask them what you can put in the .htaccess file?