Links does not work in <a href> tag when content has .com inside

浪子不回头ぞ 提交于 2019-12-24 04:49:06

问题


in my code I generate a body of a html email message. Part of it is following:

<a href="mylink.pl">SomeName.com</a>

When I receive this email in my Mail client or in Gmail and when I click the link I'm directed to the SomeName.com and not to the mylink.pl which is in the href part of the <a> tag. And it looks that this situation occurs only for the .com domains.

Any ideas how I could deal with this?


回答1:


Use absolute URIs in emails. They start with (usually) http://

What you have is a relative URI, which doesn't make much sense in an email. You are probably just hitting your browser's search function when you try to visit it.



来源:https://stackoverflow.com/questions/6522616/links-does-not-work-in-a-href-tag-when-content-has-com-inside

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!