RewriteCond %{REQUEST_URI} ^(.*)<.*?>(.*)$ RewriteRule ^.*$ %1%2 [E=replacer:%1%2] RewriteCond %{ENV:replacer} !^$ RewriteCond %{ENV:replacer} !^.*<.*?>.*$ RewriteRule ^.*$ %{ENV:replacer} [R=301,L]
This part matches the tags: "<.*?>". Replace that with your character or pattern.