diff options
Diffstat (limited to 'src/java/com/juick/http')
-rw-r--r-- | src/java/com/juick/http/www/UserThread.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 93a793c5c..efec88990 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -67,7 +67,11 @@ public class UserThread { response.setContentType("text/html; charset=UTF-8"); PrintWriter out = response.getWriter(); try { - PageTemplates.pageHead(out, title, "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + msg.User.UName + "\" href=\"//rss.juick.com/" + msg.User.UName + "/blog\"/>"); + String headers = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + msg.User.UName + "\" href=\"//rss.juick.com/" + msg.User.UName + "/blog\"/>"; + if (paramView != null) { + headers += "<link rel=\"canonical\" href=\"http://juick.com/" + msg.User.UName + "/" + msg.MID + "\"/>"; + } + PageTemplates.pageHead(out, title, headers); if (!Utils.isMobileRequest(request)) { PageTemplates.pageNavigation(out, visitor, null); @@ -243,12 +247,12 @@ public class UserThread { out.println("<div class=\"title2\">"); out.print(" <div class=\"title2-right\">"); if (listview) { - out.print("<a href=\"?view=tree\">Показать деревом</a>"); + out.print("<a href=\"?view=tree\" rel=\"nofollow\">Показать деревом</a>"); } else { if (foldable) { out.print("<span id=\"unfoldall\"><a href=\"#\" onclick=\"$('#replies>li').show(); $('#replies .msg-comments').hide(); $('#unfoldall').hide(); return false\">Раскрыть все</a> · </span>"); } - out.print("<a href=\"?view=list\">Показать списком</a>"); + out.print("<a href=\"?view=list\" rel=\"nofollow\">Показать списком</a>"); } out.print("</div>"); out.println(" <h2>Ответы (" + replies.size() + ")</h2>"); |