I have been searching all over google and stackoverflow, and have been finding a large number of answers but none seem to work for me.
Basically what I want is to rewrite my url localhost/index.php?page=1 to localhost/1, while still keeping the query alive.
Now, I have managed to remove the .php with the following code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
But removing the Query simply does not seem to work.
Please help me out.