Configure .htaccess to allow awstats to work with clean URL's

When I installed Drupal with clean url's it made my Awstats (within the cgi-bin) not work and just return a Drupal page not found error.

Drupal is installed in the root directory (public_html) of my web space so is the cgi-bin folder that Awstats is in.

I fixed the problem by changing the protect files and adding 1 rewriteCond line to the .htaccess file as follows:

In the FilesMatch section, find " |code-style\.pl " without the quotes and remove it from the following code:

# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|Entries.*|Repository|Root)$">
  Order deny,allow
  Deny from all
</FilesMatch>

Now add this line (RewriteCond %{REQUEST_URI} "!cgi-bin/") to the following:

  # Rewrite current-style URLs of the form 'index.php?q=x'.
 
  RewriteCond %{REQUEST_URI} "!cgi-bin/"

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

This was all done on the default install of Drupal w/.htaccess.

Mailman does work with this fix

jnunn - July 28, 2006 - 19:45

I use mailman through my hosting provider. Recently something occurred which prevent me from accessing the mailman pages.

Previously, I could access the admin pages at http://domain/mailman/admindb/listname

Now, I get a 404 File Not Found Error.

I installed drupal through Fantastico, and I think I've only had this problem since I've upgraded to 4.7 (our list is not that busy).

I've attempted to follow the directions offered by previous posts (http://drupal.org/node/30334, http://drupal.org/node/69500), but these have not worked.

What appears to be different from others who have posted is the location of the mailman code, which is not at my root level. So even though the URL appears as http://domain/mailman/ - there is no folder at my top-level domain called mailman.

Any idea how I can correct this through .htaccess?

 
 

Drupal is a registered trademark of Dries Buytaert.