I was able to get drupal 4.6.5 installed into my account at Netfirms, but when I pointed a browser at it, I got a 500 Internal Server Error. After taking a look at it, their tech support said its probably a problem with the .htaccess file because Netfirms only supports password protection of folders and custom error pages through .htaccess.

My questions: Is there a simple way to make Drupal work with a more limited (or even without) .htaccess file? Is it time to find another host? (I actually like Netfirms otherwise, and their tech support is reasonably responsive)

Comments

styro’s picture

You could remove the .htaccess altogether.

Or you could comment out / remove the bits that don't apply to folder protection (the <Files ~ "..."> ... </Files> section) or custom error pages (the ErrorDocument line). You could try commenting out stuff bit by bit to see exactly which bits it chokes on.

Either way it looks like you'll lose clean urls and a few other settings. Drupal should still run though.

--
Anton

icesar’s picture

Thanks for the fast help! After commenting out most of the file I was still having problems so I removed it, and that worked. However, without support for clean URLs I think I'm better off starting up another hosting accounts

vinnym’s picture

You were on the right track with commenting out most of the .htaccess file, but didn't go far enough. The only command(s) Netfirms will allow in that file (for our purposes) is the
RewriteEngine On. Comment out everything except this:

RewriteEngine on

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

# 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]

Don't forget to change the rewrite base if you're using a sub-directory. Clean URLs will then work, no more 500 server errors.

gabriel.’s picture

Thanks a bunch for this; I just spent the last 4 hours trying to figure this out.

Interestingly enough, after doing this, I tried uncommenting everything I had commented out one block at a time, and everything worked fine by default, as long as I had RewriteBase / (instead of RewriteBase /drupal) uncommented as well.