From c41ded3124c79640fa553b997b0db684b6e41916 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 24 Mar 2017 16:33:24 +0900 Subject: [PATCH] Fix #773 no refresh after redirect() when not using mod_rewrite --- common/js/common.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index d21b5df8a..2bfddce19 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -465,8 +465,10 @@ function sendMailTo(to) { * @brief url이동 (Rhymix 개선된 버전) */ function redirect(url) { - if (url === window.location.href || url.indexOf(window.location.href.replace(/#.+$/, "") + "#") === 0 || - url === window.location.pathname || url.indexOf(window.location.pathname.replace(/#.+$/, "") + "#") === 0) { + var absolute_url = window.location.href; + var relative_url = window.location.pathname + window.location.search; + if (url === absolute_url || url.indexOf(absolute_url.replace(/#.+$/, "") + "#") === 0 || + url === relative_url || url.indexOf(relative_url.replace(/#.+$/, "") + "#") === 0) { window.location.href = url; window.location.reload(); } else {