I want to redirect these URLs:
http://example.com/search
to http://example.com/?page=search
http://example.com/search?q=keyword
to http://example.com/?page=search&q=keyword
I am trying to use this in .htaccess but doesn't work:
RewriteRule ^search$ ?page=search [nc]
RewriteRule ^search\?(.*)$ ?page=search&$1 [nc]
What am I doing wrong?