How do I make my javascript row link a nofollow link?
<tr class="thumbnail-item" onclick="window.open('<%= vind.tracking %>')" 开发者_StackOverflow中文版>
You can't, but since search engines ignore JavaScript, that really doesn't matter.
You can have the url go trough a redirector that is blocked in robots.txt.
If you want to link to google.com
then you'll open yoursite.com/blocked.php?url=google.com
, and have the url yoursite.com/blocked.php
blocked in robots.txt. blocked.php will then redirect to the specified url parameter, but will be blocked for crawlers. F.ex:
User-agent: *
Disallow: /blocked.php
Source
精彩评论