htaccess

htaccess

Posted by: tachy0n
Posted on: 2008-09-24 08:46:00

Trying to get my htaccess working with Drupal and can't seem to

<Directory />
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(stats/|missing\.html|failed_auth\.html) [NC]
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
</Directory>

can't remember if this is formatted correctly.. tried it with Directory set to my home dir too.. testing this by going to site which is normally http://tachy0n.com/?q=node to http://tachy0n.com/node and getting not found. Any ideas?

Re: htaccess

Posted by: seiler
Posted on: 2008-09-24 14:38:00

Looks like it's in the wrong place. Here's the wiki page with examples: http://wiki.dreamhost.com/Making_stats_accessible_with_htaccess

Re: htaccess

Posted by: tachy0n
Posted on: 2008-09-24 15:20:00

ok if I understood changed it to.. thanks for guess but I've tried a few variations on this already.


here's how it looks right now..

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


Re: htaccess

Posted by: seiler
Posted on: 2008-09-24 15:31:00

If that's your current file, just add this before all of that:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html).*$ [NC]
RewriteRule . - [L]
</IfModule>

Your original code didn't have the "RewriteRule . - [L]" line and just passed the request on to index.php with everything else.

You could combine them like you did before, but I know some scripts (like WP) may rewrite the .htaccess for certain changes, but will only change the original block of code, leaving whatever you add before it.

Tags: drupal