Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

Remove all occurrences of special character from URL string

$
0
0

Hello,

When reviewing our Webmaster Tools report, we found a bunch of URLs with special characters that are being added into the URL string. For example:

http://www.mywebsite.com/%3Cb%3Erecipes%3C/b%3E/pineapple-%3Cb%3Ebarbecue%3C/b%3E-%3Cb%3Esauce%3C/b%3E-%3Cb%3Epork%3C/b%3E-%3Cb%3Echops%3C/b%3E

http://www.mywebsite.com/%3Cb%3Erecipes%3C/b%3E/lasagna-with-%3Cb%3Ewhite-sauce%3C/b%3E

The URLs are all of different lengths, but all of them contain the %3Cb%3E and %3C/b%3E portion.

Is there a URL rewrite rule that can be created to simply strip out those characters? I have tried adding this regular expression to the {REQUEST_URI} condition, but it doesn't seem to match everything:

\%3Cb\%3Erecipes\%3C\/b\%3E/(.*)-(\%3Cb\%3E|\%3C\/b\%3E)(.*)(\%3Cb\%3E|\%3C\/b\%3E)(.*)

Any help would be greatly appreciated.

Thanks,

Sheel Shah

http://www.tasteofhome.com/%3Cb%3Erecipes%3C/b%3E/pineapple-%3Cb%3Ebarbecue%3C/b%3E-%3Cb%3Esauce%3C/b%3E-%3Cb%3Epork%3C/b%3E-%3Cb%3Echops%3C/b%3E

Viewing all articles
Browse latest Browse all 2482

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>