url rewrite issue

Discussion in 'Apache' started by itsmani1, Jun 7, 2005.

  1. #1
    i want to redirect my test/old.html page to test/new.html .... using mode_rewrite.
    any help plz.
     
    itsmani1, Jun 7, 2005 IP
  2. Tuning

    Tuning Well-Known Member

    Messages:
    1,005
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    138
    #2
    RewriteEngine on
    RewriteRule ^old\.html$ new.html
    Code (markup):
    Put this in a htaccess and in test folder. :)
     
    Tuning, Jun 7, 2005 IP
  3. itsmani1

    itsmani1 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    sorry please.....
    its not working giving "HTTP 404 - File not found"
     
    itsmani1, Jun 8, 2005 IP
  4. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #4
    what about
    
    RedirectMatch permanent ^/old.html$ new.html
    
    Code (markup):
    i get the feeling that its wrongly written but might work
     
    just-4-teens, Jun 8, 2005 IP
  5. Tuning

    Tuning Well-Known Member

    Messages:
    1,005
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    138
    #5
    Sorry I'm not an mod-rewrite expert. But that is the simplest code I'm using on my sites.

    Don't know why its not working on your server.

    btw, do you put the htaccess in test folder ?

    Regards,
    Tuning
     
    Tuning, Jun 8, 2005 IP
  6. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #6
    also just to clarify you must remember the "." (DOT) before the htaccess part so should look like
    .htaccess
     
    just-4-teens, Jun 8, 2005 IP
  7. itsmani1

    itsmani1 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yeah i know tht name is (.htaccess) and its in test folder..
     
    itsmani1, Jun 8, 2005 IP