Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008
    Posts
    55

    Unanswered: Mod Rewrite 301 Help

    I need to 301 some links. I have been getting my knees wet with ModRewrite for a while now, but this one seems to throw me. The format I'm looking for is below.

    Old - http://www.sitename.com/big-widget/blue/2.html

    New - http://www.sitename/blue-big-widgets/2.html

    Two thinks to note, I have added a (s) to the end of widgets. As well as the 2.html will be any number between 1-100 depending on the page.

    Thanks for your help in figuring this out.

  2. #2
    Join Date
    Mar 2008
    Posts
    55
    The solution I ended up going with was

    Code:
    RewriteRule ^(big-widget)/([^/\.]+)/(.*) $2-$1es/$3 [R=301,L]
    A more dynamic version is

    Code:
    RewriteRule ^([^/\.]+)/([^/\.]+)/(.*) $2-$1es/$3 [R=301,L]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •