I had clean urls working just fine. I moved my database and drupal files to a new webserver. Its running Mac OS X server 10.5 just like the old server. Based on http://drupal.org/node/15365 I added

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

to the httpd.conf file and the web server started, however I am still getting the drupal error "Your system configuration does not currently support this feature. The handbook page on Clean URLs has additional troubleshooting information." For performance reasons I was told not to use .htaccess files. I added the rewrite code directly to the Apache httpd.conf. That should work, but I am still getting the error. Where can I look next? What tests are failing that cause this error to display?

Comments

vm’s picture

is mod_rewrite enabled in apache?

pbarnett’s picture

Did you restart Apache after making the changes?

Pete.

agerson’s picture

Yes, mod_rewrite is enabled and yes I restarted Apache.

pbarnett’s picture

I'd personally try the .htaccess route - I've never noticed a performance hit, and getting the rewrite to work is the priority, no?

Pete.

splashworx’s picture

I have an issue regarding a sub-domain URL, ie. http://server.domain.com/drupal

mod-rewrite isn't liking that at all regardless of the edits made to .htaccess.

Just my two-cents worth.

vm’s picture

is $base_url set in settings.php

splashworx’s picture

Ok, cheers, changed base URL settings but still no clean URLs.

I'm concerned that once the production site is built using the settings here, what will happen (to the database) when the domain is eventually delegated to the DNS.

Here's what I have - this is not applying Clean URLs (even after running update.php):

settings.php
$base_url = 'http://romana.webcity.com.au/~gre49867/d613';

.htaccess

RewriteEngine on
RewriteBase /d613
# And, of course
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

vm’s picture

If that didn't fix the issue you are having than don't use it. comment that line back out.

Had it worked, you could have changed it later after the DNS propagated.

agerson’s picture

I finally got it working without .htaccess. I had to add my subdirectory to the RewriteRule

<IfModule mod_rewrite.c>
	<Directory "/Library/WebServer/Documents/drupal">
		RewriteEngine on
		RewriteBase /
		# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteCond %{REQUEST_URI} !=/favicon.ico
		RewriteRule ^(.*)$ /drupal/index.php?q=$1 [L,QSA]
	</Directory>
</IfModule>