Typical approach is to use RewriteCond in combination with rules. In example below,
RewriteRule is ignored, if on this path exists file (-f) or directory (-d)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
More details and examples are present in the documentation
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html[
^]