aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick')
-rw-r--r--src/java/com/juick/http/www/Discover.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java
index ff4b3ee5..ca78f41e 100644
--- a/src/java/com/juick/http/www/Discover.java
+++ b/src/java/com/juick/http/www/Discover.java
@@ -43,6 +43,14 @@ public class Discover {
if (paramTag == null) {
Errors.doGet404(sql, request, response);
return;
+ } else if (paramTag.SynonymID > 0 && paramTag.TID != paramTag.SynonymID) {
+ com.juick.Tag synTag = TagQueries.getTag(sql, paramTag.SynonymID);
+ String url = "/tag/" + URLEncoder.encode(synTag.Name, "UTF-8");
+ if (request.getQueryString() != null) {
+ url += "?" + request.getQueryString();
+ }
+ Utils.sendPermanentRedirect(response, url);
+ return;
} else if (!paramTag.Name.equals(paramTagStr)) {
String url = "/tag/" + URLEncoder.encode(paramTag.Name, "UTF-8");
if (request.getQueryString() != null) {