redirects for exact match only

Discussion in 'Apache' started by lonewolfonline, Apr 2, 2008.

  1. #1
    Hi,
    I was wondering if somebody could help me, I have a Wordpress install that puts a base "tag" in the url for each category, but the base tag by itself does not exist. I would like to redirect the non-existent page to a page that does exist. Examples are probably clearer.

    Here are urls to two categories

    http://www.example.net/category/this-is-my-cat-1/
    http://www.example.net/category/this-also-is-my-cat-2/

    However if somebody removes the category from the url and just tries to go to http://www.example.net/category/ they get a 404.

    How do I redirect http://www.example.net/category/ to http://www.example.net/a-static-page/ while keeping all the original links intact.

    The redirects I have tried redirect /category/ as well as anything after, breaking the category links.

    Thanks in advance

    Regards
    Tim
     
    lonewolfonline, Apr 2, 2008 IP