I finally fixed my Clean URLs problem, and would like to thank those of you who tried so valiantly to help (especially pulsifer), as per this thread:

http://drupal.org/node/54231

Alas, I ended up mucking my way through it as I often do. Here's how it worked out for me. No guarantees that it'll work the same for you, but hopefully you can glean something that will trigger that "aha!" moment for you:

My first issue was whether "AllowOverride" was set to "none" or "all". Since I run my own LAMP server (based on Ubuntu Linux), I had already gone through and diligently changed practically every "AllowOverride" I could find to "all" in my apache2.conf file and 000-default file (I think that one's only found in Ubuntu). But it still wasn't working. I read up just a bit on "AllowOverride" and noticed they have options for things like Indexes, Authconfig, Limits, etc. I went back to check my "AllowOverrides" again and found a second "AllowOverride" just below it! Like this:

<directory /var/www/sharedip>
    Options +Includes -Indexes
    AllowOverride all
    AllowOverride Indexes AuthConfig Limit FileInfo    <this is the line I ended up commenting out to make it work
    Order allow,deny
    Allow from all
    <files ~ "^\.ht">
    Deny from all
    </files>
</directory>

I can't believe that I missed that, but it's because I had gotten used to seeing "AllowOverride All/None", not with a bunch of other options. I have no idea why that second one was there. I also run ISPConfig, so maybe that has something to do with it. I simply commented out the second "AllowOverride" and saved the file. That was the first of what turned out to be three fixes I had to do before I could enjoy clean URLs.

The next problem was that I was still getting a "Forbidden Access" message when trying to access the site with the default .htaccess file that I had:

http://drupal.org/node/54231#comment-102523

The problem is, that's not the default .htaccess file. I don't know why mine was missing stuff, but these items:

Order deny,allow
Deny from all

ExpiresByType text/html A1

were supposed to have some code around them like this:

<strong><Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$"></strong>
  Order deny,allow
  Deny from all
<strong></Files></strong>

<strong><IfModule mod_expires.c></strong>
  ExpiresByType text/html A1
<strong></IfModule></strong>

why the code wasn't there in my file? I don't know, but once added, I finally had access to my website...problem solved, almost (I still didn't have clean URLs. That came next). I also followed some suggestions on the drupal forums by uncommenting RewriteBase /drupal (and changing the /drupal to just / because my Drupal install is in the root directory of my website), I also put a / in front of the index.php near the very bottom of the .htaccess file. I have no idea if these do anything for my website, but they don't appear to hurt.

The third problem was that, even though I now had access to my site, I didn't have clean URLs yet. Whenever I would go to admin/settings to try to enable the clean URLs, I would get a message that "The directory /tmp does not exist", along with a cryptic sounding mkdir message at the top of my browser about line 86 of file.inc trying to write something or another. Plus, the "temporary directory" box was red. I spent at least 2 hours trying to figure this one out, but I'll save you the hassle and tell you that it was ridiculously simple:

Go to your "temporary directory" and take the / out from in front of the /tmp, so it's just plain tmp. Believe me, I tried everything else but that until I finally figured it out. Oh, and make sure that the tmp directory exists in your Drupal directory, and is chmodded to 777 (or maybe a bit stricter for security's sake).

Once that was done, I now had clean URLs.

simple, huh? not!

Vince

Comments

cel4145’s picture

I can't remember how many times I've spent hours getting .htaccess working on a different server setup. Perhaps it would be easier if I understood Apache more, but there are always little things that cause problems. The last time was with getting .htaccess to work with SUSE home accounts. Took five hours.

So I feel for you, but as is always the case, the worst is now over :)