Forum Moderators: phranque
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /\%E2\%80\%8B(([^/?#\ ]+/)*([^.?#\ ]+\.)*htm([?#].*)?)\ HTTP/1\.
RewriteRule \.htm$ http://www.example.com/%1 [R=301,L]
crobb, did you find out if this was being created from your server or is this bad linking done externally?
%E2%80%8B is the unicode sequence for a "zero width space". It has been implicated in several exploits of various kinds, and some email address obfuscation scripts insert it to hide the real address from email harvesters.
RewriteRule \%E2\%80\%8B /my-special-script.php [L] RewriteRule &8203; /my-special-script.php [L] <?php
$server_url = $_SERVER['HTTP_HOST'];
IF (preg_match('/^www\./', $server_url)!==true)
{$server_url = "www." . $server_url; };
$old_url = $_SERVER['REQUEST_URI'] );
$new_url = str_replace("%E2%80%8B", "", $old_url");
$new_url = str_replace("&8203;", "", $new_url");
$new_url = 'http://' . $server_url . '/' . $new_url;
HEADER "Status: HTTP/1.1 301 Moved Permanently";
HEADER "Location: " . $new_url;
?>