this is a very simple way to remove the index.php from your URL. Please note that this only works if you are running an Apache web server and mod_rewrite is enabled!
Just add the following lines to your root .htaccess file (directly after RewriteEngine On):
The trick is the IS_SUBREQ: So the redirect will not work in sub directories like /admin or /archive (the index.php have to stay there) and it will no affect POST or GET requests!