What I want to do is redirect all non exist URLS to index.php?q=%URL%, for example:
www.example.com/ggg will redirect to www.example.com/index.php?q=ggg
however, I want the address bar to still show www.example.com/ggg
what I got so far is this:
Options +FollowSymLinks
RewriteEngine On
# redirect all requests to non-existing resources to special handler
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/? /index.php?q=$1 [L,NC,R]
but it keeps changing the address bar and also I'm not sure it actually works all the time.
any suggestions? Thanks