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]
Comment | File | Size | Author |
---|---|---|---|
#7 | 20080112.htaccess-virtualdocumentroot-comment.patch | 1.31 KB | Bart Jansens |
Comments
Comment #1
ChrisKennedy CreditAttribution: ChrisKennedy commentedIt would be helpful if you described what servers/configurations this solution is needed for.
Comment #2
mdlueck CreditAttribution: mdlueck commentedIt 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.
Comment #3
morgler CreditAttribution: morgler commentedI 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!
Comment #4
jnallee CreditAttribution: jnallee commentedThis solution worked for me on GoDaddy hosting.
Drupal 5.5 w/ clean URL's
Thanks again.
+N
Comment #5
pcambraThis works 100% for godaddy hosting, as seen in http://drupal.org/node/204419
Comment #6
chx CreditAttribution: chx commentedBackport
# 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.
Comment #7
Bart Jansens CreditAttribution: Bart Jansens commentedBackported comments from D6.
Comment #8
drummCommitted to 5.x.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
dannychang CreditAttribution: dannychang commentedDreamHost 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]