Can you change characters in htaccess?

Discussion in 'Apache' started by theblade24, Sep 14, 2007.

  1. #1
    I have quite a few urls that have been spidered and cached with characters in them that I would like to change if a spider or human hits one of the links.

    So if someone clicks on a link in google search results with %20 or %5B or %5D or [ or ] or " or ' or ) or ( or anything like that..... I'd like in htaccess to somehow be able to change them to a - (hyphen).

    There is no pattern, the characters could appear anywhere in the urls in different places.

    Is there a an expression method to search thru a list of characters in a url and if one or more is found then change them to a hyphen?
     
    theblade24, Sep 14, 2007 IP