Need help with rewrite rule

Discussion in 'Apache' started by crumblepie, Jul 5, 2012.

  1. #1
    For 2 days now, I've been trying to convert forumdisplay.php?f=63 to forumdisplay.php?f=1 but nothing works.

    Last one I tried was:

    RewriteRule ^forumdisplay.php?f=63/$ forumdisplay.php?f=1 [L,R=301]

    What am I doing wrong?
     
    crumblepie, Jul 5, 2012 IP
  2. RoseHosting

    RoseHosting Well-Known Member

    Messages:
    230
    Likes Received:
    11
    Best Answers:
    11
    Trophy Points:
    138
    #2
    Try with the following code

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^forumdisplay.php?f=63$ [url]http://yourwebsite.com/forumdisplay.php?f=1[/url] [R=301,L]
    Code (markup):

     
    RoseHosting, Jul 6, 2012 IP
  3. crumblepie

    crumblepie Well-Known Member

    Messages:
    2,612
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Thanks Rose Hosting. I tried it but it still doesn't work...
     
    crumblepie, Jul 6, 2012 IP