开发者

.htaccess rule to redirect 'domain.tld.' to 'domain.tld'

开发者 https://www.devze.com 2022-12-25 12:07 出处:网络
I\'ve scoured Google and this site pretty extensively, and I must be missing something. None of the suggestions I\'ve found worked.

I've scoured Google and this site pretty extensively, and I must be missing something. None of the suggestions I've found worked.

The problem is simple. I have links coming in to my site using http://domain.name./ but I want all visitors redirected to htt开发者_开发知识库p://domain.name/ without the trailing dot.

How can I do that?


RewriteEngine On

RewriteCond %{HTTP_HOST} (.*)\.$
RewriteRule (.*) http://%1/$1 [L,R=301]
0

精彩评论

暂无评论...
验证码 换一张
取 消