Hi Guys,
I got stuck with trying to get clean urls working with a DONHOST server account recently and thought I would post up here in case it helps others with a similar problem.
For reference, the donhost account I had problems with was Apache (Version 2.0.55), PHP Interface CGI with PHP Version 5.1.2.
The out-of-the-box .htaccess that comes with Drupal has always got Clean Urls working for me without any modification in the past, but, on the DONHOST server it returned an "Internal server error" when trying to run the Clean Urls test on the Admin -> Settings page.
To compound the problem MOD_REWRITE (the apache module that automatically catches links and returns clean urls) wasn't showing up using a simple PHPINFO.PHP file. The host was insisting mod_rewrite was installed and enabled and because it wasn't showing in phpinfo, I assumed it wasn't.
Anyways. I'm not a server/apache expert but the way I got around it was to un comment the rewrite base line in the .htaccess file:
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
# RewriteBase /drupal
So I ended up with this:
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /
As I say, I'm not a server/apache expert, but, I think what doing the above achieves is it to set the rewrite base default to the root doc folder i.e. /. In other words, mod_rewrite was enabled, despite not showing up as such in the phpinfo output and it hadn't got an initial default set.
hope that helps others..I've been pulling hair out over this for ages. Thanks to Brenda003, CHX and THA_SUN on Drupal-support IRC for helping me nail the problem.
Dub
Comments
Nice one Dub
I had the same issue - thanks for posting this :))