2011-06-29 10 views
2

in my code I generate a body of a html email message. Part of it is following:リンクは<a href> tag when content has .com inside

<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

Try using absolute urls as Quentin mentioned. Tongue in cheek, that code snippet seems to be for phishing :-) – Satish

+0

No it's not fishing, we just want to count how many times our users go to different sited from our links, so the link leads to our service, but the user is automatically redirected to the service SomeName.com – Jakub

+0

So what you really want is: 'SomeName.com 'で動作しません。 –

答えて

9

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.

+0

http://があるので、基本的にコードは次のとおりです。 SomeName.com Jakub

+2

@ジャカブ:クエンティンの答えを見て、あなたのリンクを見てください。今答えを振り返ってみてください。悲しいことに、リンクリンクには「http://」が含まれていません。 'YourDomain.com' –

+0

のようなものを試してください申し訳ありませんが、私は最後のコメントに書式を入れるのを忘れていました。私が使用しているリンクは次のとおりです: ' Jakub

関連する問題