diff options
author | Vitaly Takmazov | 2018-05-21 16:30:41 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-05-21 16:30:41 +0300 |
commit | 959effbbad1f8bbf3f90879212732a2e42011b22 (patch) | |
tree | e7227d3385bfcaad50817fcb42d99feaf3bf215c /juick-www/src/main | |
parent | c7c2b377642a337edc303756836c9f0843cdc145 (diff) |
permanent redirect for /DDDDDD links
Diffstat (limited to 'juick-www/src/main')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/AnythingFilter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/AnythingFilter.java b/juick-www/src/main/java/com/juick/www/controllers/AnythingFilter.java index 52e748f0..2e6da6c3 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/AnythingFilter.java +++ b/juick-www/src/main/java/com/juick/www/controllers/AnythingFilter.java @@ -39,7 +39,9 @@ public class AnythingFilter implements Filter { com.juick.User author = messagesService.getMessageAuthor(messageId); if (author != null) { - ((HttpServletResponse)servletResponse).sendRedirect("/" + author.getName() + "/" + anything); + HttpServletResponse response = ((HttpServletResponse)servletResponse); + response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); + response.setHeader("Location", "/" + author.getName() + "/" + anything); return; } } |