PDA

View Full Version : .htaccess problem


RDX1
05-19-2006, 10:56 AM
Hopefully someone knows something about this.. I am using .htacess to rewrite urls on one of my sites, yet it rewrites them even in subdirectories. Any one know how to get it to rewrite the root directory only?

<IfModule mod_rewrite.c>
RewriteEngine on

# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Edit/Delete Message

roosevelt
05-19-2006, 10:12 PM
I think it is because of the rewrite condition you have over there. Anyways this is the rewrite codes I use using .htaccess

RewriteEngine On
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]