Help With What I thought was a simple Redirect

Discussion in 'Apache' started by SmartMoney, Jun 13, 2007.

  1. #1
    I'm in the process of moving a site that was in ASP.net to WordPress, so I had to set up some redirects.

    I'm a rookie to Linux servers so apologies in advance if this is a really dumb question.

    Here's one that is causing problems:

    This is needed because WordPress adds the word "category" into the URL of category pages. Note: it doesn't add it onto the actual individual pages in that category.

    The problem is that I want this redirect to work on ONLY the category root and it is affecting all the category pages.

    Therefore:

    http://www.mysite.com/News/
    goes to
    http://www.mysite.com/category/news

    this is working with my rule above, but:

    http://www.mysite.com/News/News-Item1.aspx
    goes to
    http://www.mysite.com/news/news-item1.aspx

    I have the permalinks in WP set up so the second one works when the .htaccess rule is not there, but with the rule in place then I get this:

    http://www.mysite.com/News/News-Item1.aspx
    goes to
    http://www.mysite.com/category/newsnews-item1.aspx

    Which results in a 404

    Is there a way to modify the rule so that it only redirects the category root pages and not all the individual articles?
     
    SmartMoney, Jun 13, 2007 IP