I've tried and looked for lot of your posts, cannot get it working yet.
all URL from the site I have a simple PHP config like this example :
http://www.example.com/index.php?page=pagename
I'm wondering if I can hide Quesry_String like this :
http://www.example.com/pagename/
In the server config (apache 2.2 using virtual host without .htaccess) :
DocumentRoot "/home/account/www/www.mysite.com/"
Options -MultiViews
DirectoryIndex index.php
RewriteEngine On
## Rewrite 301 old Quesry_string (?p => ?page) ##
RewriteCond %{QUERY_STRING} ^p=([^&]+) [NC]
RewriteRule ^/$ /?page=%1 [R=301,L]
## Trying to hide query_string (not working) ##
#RewriteCond %{QUERY_STRING} ^page=([^&]+) [NC]
#RewriteRule ^/$ /%1 [R=301,L]
#result => http://www.www.mysite.com/pagename?page=pagename (404)
## Rewrite 301 old page names ##
RewriteCond %{QUERY_STRING} ^page=oldpagename$ [NC]
RewriteRule ^/index\.php$ /?page=pagename/ [R=301,L]
## Remove index.php from url ##
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?)
RewriteRule ^ /%1 [R=301,L]
#Rewrite 301 index.html to root /
RewriteRule ^/index.htm?$ index.html [NC,R=301,L]
RewriteRule ^/index.html?$ / [NC,R=301,L]
I guess I'm almost there, thank you for your help.