I basically want:
http://example.com/index.php?page=abc to redirect to http://www.exmaple.com/abc
I have:
RewriteCond %{QUERY_STRING} ^page=(.*)$
RewriteRule ^index.php$ %1? [R=301]
RewriteRule ^%1$ index.php?page=%1 [L]
I basically want:
http://example.com/index.php?page=abc to redirect to http://www.exmaple.com/abc
I have:
RewriteCond %{QUERY_STRING} ^page=(.*)$
RewriteRule ^index.php$ %1? [R=301]
RewriteRule ^%1$ index.php?page=%1 [L]
Some syntax issues in your 2nd rule and logic ones in your 1st rule.
Following should work:
PS: I suggest you to read: Apache mod_rewrite Introduction