Mod rewrite for old miva pages

Discussion in 'Site & Server Administration' started by DenRomano, Aug 26, 2009.

  1. #1
    I moved off Miva so my page names have all changed. I want to send people to the best page if they come from somewhere using the old page name. All the Miva product pages are in the for

    www.Domainname.com/p-ITEM_NUMBER

    for example

    www.Domainname.com/p-toshiba-DKT2020SD

    I would like to take the charaters after the p- and stuff them in my new search page like

    RewriteRule ^(.+)/p-(.+)$ /search.php?t=$2 [R=404,L]

    but it does not work, any ideas why?
     
    DenRomano, Aug 26, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't think you can do R=404, so you may want to try:

    RewriteRule ^p\-(.+)$ /test.php?t=$1 [R=301,L]
     
    premiumscripts, Aug 26, 2009 IP