htaccess rewrite help

Discussion in 'Apache' started by big dog, Jun 12, 2007.

  1. #1
    I'm using smf forum currently and am in the middle of wrapping Joomla around it using a bridge. However there are 50k posts/urls that are indexed in the search engines and hope to keep them there. So I'm trying to rewrite the new urls to render the old ones... just for the forum section which as you'll see uses the syntax: option=com_smf.

    I need to change the url:
    index.php?option=com_smf&topic=1.msg2#new

    to this:
    index.php?topic=1.msg2#new

    How would I write this in the htaccess file?
     
    big dog, Jun 12, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Try with this:

    
    RewriteEngine on
    RewriteBase /
    RewriteRule   ^index\.php\?(option=com_smf&)(.*)       /index\.php\?$2
    
    Code (markup):
     
    ajsa52, Jun 12, 2007 IP
  3. big dog

    big dog Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    that didn't work.

    I should mention that msg2 is dynamic, msg3, msg43 etc.
     
    big dog, Jun 12, 2007 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Search for option or com_smf in the file and edit the link code.
     
    Nintendo, Jun 12, 2007 IP