How to rewrite url in this case

Discussion in 'Apache' started by hope2life, Dec 22, 2012.

  1. #1
    Hello,

    I have a site where both urls as below go to same page.

    www.mydomain.com/pd/Children_Products/Toys/1/


    www.mydomain.com/pd/Children_Products/Toys_/1/

    first url has Toys
    2n url has Toys_


    This is not good for search engines. I want that when second url is called either it give 404 not found page or simply it redirects to first url.
    I am not looking for solution to this particular url but also all such instances where this happens in my site for different directories.

    Any help would be greatly appreciated.

    Thanks!
     
    hope2life, Dec 22, 2012 IP