.htaccess mod_rewrite question

Discussion in 'Apache' started by webdev11, Jan 3, 2008.

  1. #1
    I have an .htaccess file with some rewrite rules in it. Here is a sample line:

    RewriteRule ^p([0-9]+_?[0-9]*)/(.*)/pages\.html$ pages.php?pID=$1 [QSA,L]
    Code (markup):
    I want to 301 redirect the old URLs to the new, rewritten URLs. I added R=301 but that is not working. What am I doing wrong?
     
    webdev11, Jan 3, 2008 IP
  2. maiahost

    maiahost Guest

    Messages:
    664
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    when you say "I added R=301" do you mean you replaced [QSA,L] with [R=301,L] ?
     
    maiahost, Jan 4, 2008 IP
  3. webdev11

    webdev11 Peon

    Messages:
    52
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I did this:

    ...but it didn't work... I'm not sure how to get it to redirect, or if it's even possible.
     
    webdev11, Jan 4, 2008 IP