Forum Moderators: phranque
On my web host (DreamHost), stats are viewed as [domainname...] However, I can't figure out how to prevent the rewrite rules from catching the stats URL and redirecting it to drupal.
The basic rule which converts a 'clean' URL into a query string is:
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
I tried adding the following and several variations as the first rule, but I can't get one to work:
RewriteRule ^stats(.*) stats$1 [NC,L]
Welcome to WebmasterWorld!
The first rule you posted doesn't seem to apply, since the /stats directory exists (the rule should fail on the !-d test). Are there any others that might be causing this?
The quick fix is to precede any rules that might be interfering with:
RewriteRule ^stats - [L]
Note that the leading slash is stripped before testing by RewriteRule in an .htaccess context. If your code is in httpd.conf, use:
RewriteRule [b]^/s[/b]tats - [L]
Jim