如何使用htaccess从网站末尾删除额外的字符?

please help me in have redirect in htaccess from http://khabarpu.com/cat/syria-news.htm#.VwHk7LGL4x4.telegram

to

http://khabarpu.com/cat/syria-news.htm

for seo i have auto delete all extra character after .htm or .php or specefic character like ==

in htaccess

You can see if the URL has a fragment and, if it does, then remove it:

$url = 'http://khabarpu.com/cat/syria-news.htm#.VwHk7LGL4x4.telegram';
$fragment = parse_url($url, PHP_URL_FRAGMENT);

// Has a fragment
if ($fragment !== null) {
    // Remove it
    $url = substr_replace($url, '', strlen($url) - strlen('#'.$fragment));
}
echo $url;