URL Rewriting - automatic convert

Discussion in 'Apache' started by rajnesh, May 30, 2008.

  1. #1
    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
     
    rajnesh, May 30, 2008 IP
  2. ForumJoiner

    ForumJoiner Active Member

    Messages:
    762
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    83
    #2
    Why do you want to convert to that? I ask this because maybe the problem is somewhere else.
     
    ForumJoiner, May 31, 2008 IP