View Full Version : htaccess confusion

11-08-2008, 12:03 PM
hey everyone ...

in my .htaccess file, i have the following code:

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

which basically stipulates that if someone types the address:
it will redirect them to the following address:

This works great! But the problem is, if i have files in the directory which also use this type of methodology, they're not working. For example ...

If I type the following in:
It attempts to redirect me to the following (which I dont want it to redirect me at all):

Now, I have told htaccess (using the !-f and !-d operators) that if the file exists, do not redirect - however, it's not liking the rewriting that's occuring because the filename is not an "exact match".

The script has to be flexible to allow this ...

Does anyone have any suggestions?

11-08-2008, 12:48 PM
http://www.example.com/language/en How about changing your logic like,

If the request is like /language/.*
then redirect to the required file.