i have set below syntaxt in my site Options +FollowSymLinks RewriteEngine on RewriteRule pictures/(.*)/ pictures.php?gallery=$1 enter above syntax in .htaccess file we convert http://www.mysite.com/picuters.php?gallery=4 to url http://www.mysite.com/pictures/4/ but somebody enter directly first one like http://www.mysite.com/picuters.php?gallery=4 so, my requirement is if anybody type "pictures.php?gallery=4" then automatic convert /pictures/4/ Please help me Thanks in Advance Rajnesh