mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
When SSL is optional, redirect to http after writing (#1939)
This commit is contained in:
parent
7822e9c070
commit
05128b9f4b
1 changed files with 6 additions and 1 deletions
|
|
@ -294,12 +294,17 @@ jQuery(function($) {
|
|||
}
|
||||
}
|
||||
|
||||
re = /http:\/\/([^:\/]+)(:\d+|)/i;
|
||||
re = /https?:\/\/([^:\/]+)(:\d+|)/i;
|
||||
if (bUseSSL && re.test(uri)) {
|
||||
toReplace = 'https://'+RegExp.$1;
|
||||
if (window.https_port && https_port != 443) toReplace += ':' + https_port;
|
||||
uri = uri.replace(re, toReplace);
|
||||
}
|
||||
if (!bUseSSL && re.test(uri)) {
|
||||
toReplace = 'http://'+RegExp.$1;
|
||||
if (window.http_port && http_port != 80) toReplace += ':' + http_port;
|
||||
uri = uri.replace(re, toReplace);
|
||||
}
|
||||
|
||||
// insert index.php if it isn't included
|
||||
uri = uri.replace(/\/(index\.php)?\?/, '/index.php?');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue