I'm rather new to the whole .htaccess thing and I'm using the following right now to use 'pretty url's':<IfModule mod_rewrite.c>    RewriteEngine On    RewriteCond %{REQUEST_FILENAME} !-d    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^(.*)$ index.php?path=$1 [NS,L]</IfModule>Now i found my website a bit slow and decided to start gzipping my CSS files thru a php script I found somewhere on the web (the website). For this to work I need to rewrite the url to open the correct php file. That would look something like this:RewriteRule ^(.*).css$ /csszip.php?file=$1.css [L]But I only want the first to happen when the second doesn't and vice versa. In other words i'd like something like this:<IfModule mod_rewrite.c>    RewriteEngine On    if request doesn't contain .css do        RewriteCond %{REQUEST_FILENAME} !-d        RewriteCond %{REQUEST_FILENAME} !-f        RewriteRule ^(.*)$ index.php?path=$1 [NS,L]    else do        RewriteRule ^(.*).css$ /csszip.php?file=$1.css [L]</IfModule>Can anyone help me with the proper code or a place where i can find a way to use some kind of conditional statement in htaccess files?
.htaccess two different rules but only one per time
htaccess;mod rewrite
I will go onto something like that.First you define a new condition (RewriteCond) then you apply this condition using a rule (RewriteRule).Thanks to the flag L at the end of the RewriteRule, this stop the rewriting process immediately and don't apply any more rules. So when the request is a .css file, the first rule will be apply and not the second one. For all others request, it won't match the first condition, then go to the second one.<IfModule mod_rewrite.c>    RewriteEngine On    RewriteCond %{REQUEST_FILENAME} ^(.*)\.css$    RewriteRule ^(.*).css$ /csszip.php?file=$1.css [L]    RewriteCond %{REQUEST_FILENAME} !-d    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^(.*)$ index.php?path=$1 [NS,L]</IfModule>