How can I redirect my old urls to new urls

Discussion in 'Apache' started by PinoyIto, Jun 28, 2009.

  1. #1
    I want to redirect old urls to new urls how can I do this?

    This is the old mod rewrite I am using
    
    RewriteRule ^([A-Za-z0-9_-]*)-([0-9]*)-([0-9]*)-([0-9]*)-(.*).html$  article.php?categoryname=$1&catid=$2&id=$3&views=$4&title=$5 [L,NC]
    
    Code (markup):
    Example url:
    http://www.myurl.com/acne-101-10-1000-articletitle.html

    And the new mod rewrite is

    
    RewriteRule ^([A-Za-z0-9_-]*)-([0-9]*)-([0-9]*)-([0-9]*)/(.*).html$  article.php?categoryname=$1&catid=$2&id=$3&views=$4&title=$5 [L,NC]
    
    Code (markup):
    example of New URL format to be redirected the old url is

    http://www.myurl.com/acne-101-10-1000/articletitle.html

    Thanks for the help
     
    PinoyIto, Jun 28, 2009 IP