Stubborn mod_rewrite with Quesry strings - please help...

Discussion in 'Apache' started by menscerto, Aug 18, 2008.

  1. #1
    I've been working this for days and can't figure it out.

    After migrating my CMS platform I want to rewrite...

    
    http://www.mysite.com/cgi-bin/news/viewnews.cgi?category=1&id=123456
    
    to
    
    http://www.mysite.com/eng/index.php?news=123456
    
    (note:  category not required in destination URL)
    
    Code (markup):
    So, I've tried this...

    
    RewriteCond %{QUERY_STRING} ^id=([^&]+)
    RewriteRule ^viewnews\.cgi$ /eng/index.php?news=%1 [L]
    
    Code (markup):
    ...and no luck whatsoever.

    Can anyone help??!
     
    menscerto, Aug 18, 2008 IP