RewriteCond %{SCRIPT_FILENAME} !index.php RewriteCond %{PATH_INFO} !^/css.* RewriteRule ^([^/.]*)$ index.php?q=$1 [L] RewriteRule ^([^/.]*)/(.*)$ index.php?q=$1&q2=$2