We have spent much time tracking this problem down, found a solution, and from what I see doing searches it affects many people with many hosting providers.

We had to initially comment out the .htaccess rules that make Clean URL's work. The solution to getting Clean URL's to work and not turning 404's into 500's is as follows:

Add the line:

  #Added to keep from getting 500 errors at 1&1 w/ Clean URLs enabled
  RewriteBase /

Just after:
RewriteEngine on

to the .htaccess file in the web root. I will paste in more of the file so that you clearly see the proper context for this addition.

Maybe you would take a look at this and consider the change for the next update to Drupal.

Thanks!
Michael

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

  #Added to keep from getting 500 errors at 1&1 w/ Clean URLs enabled
  RewriteBase /

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ChrisKennedy’s picture

Priority: Critical » Normal

It would be helpful if you described what servers/configurations this solution is needed for.

mdlueck’s picture

It is at least needed for 1&1 Linux servers which have the following specs per the status page:

Drupal 5.2
Configuration file Protected
Cron maintenance tasks Last run 20 min 43 sec ago
You can run cron manually.
Database schema Up to date
File system Writable (private download method)
GD library bundled (2.0.28 compatible)
MySQL database 5.0.45
PHP 5.2.1
Unicode library PHP Mbstring Extension
Web server Apache/1.3.33 (Unix)

It also affects their MySQL 4.0.x offering.

Let me know if further details would be helpful to look into this.

morgler’s picture

Version: 5.2 » 5.3

I had the same problem on a dreamhost server. Suddenly some of my sites stopped working properly (got the 500 error when accessing any page other than the frontpage). It turned out, it only happened on the sites with clean urls on. The above solution finally solved my problem. Thanks!

jnallee’s picture

This solution worked for me on GoDaddy hosting.

Drupal 5.5 w/ clean URL's

Thanks again.

+N

pcambra’s picture

This works 100% for godaddy hosting, as seen in http://drupal.org/node/204419

chx’s picture

Backport

# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /

these lines from D6 they are commented out anyways.

Bart Jansens’s picture

Status: Active » Reviewed & tested by the community
FileSize
1.31 KB

Backported comments from D6.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 5.x.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

dannychang’s picture

DreamHost users have to use following code in .htaccess for clean URL


RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]