Rewriting ANY url in index.php? q = $ 1 will result in an internal server error, as this will create an infinite loop; instead, do something like this:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteRule ^(.*)$ index.php?q=$1 [L]
source
share