<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Try that and add
<?php
echo '<pre>';
print_r($_REQUEST);
echo '</pre>';
to your index. Then you will all the variables that are passed and can play around with them further from there.
HTH.
PS: Make sure that mod_rewrite is enabled 🙂
LoadModule rewrite_module modules/mod_rewrite.so