I want requests to my site to work as follows:
http://example.com/ would pull up the index.php file (the current default behavior) ideally without displaying the index.php
http://example.com/foo.php would pull up foo.php as would be expected
http://example.com/blerg would redirect to http://example.com/bar.php?code=blerg
I have the following rewrite rules right now
RewriteRule ^/(.*\.(php|html|htm|css|jpg))$ /$1 [NC,L]
RewriteRule ^/(.*)$ /bar.php?code=$1 [NC,L]
which almost works, except http://example.com/ pulls up bar.php instead of index.php
Ideally I wouldn't have to have every possible file extension in the first rule, I would rather it just detect if it's an actual file.