Skip to content
Snippets Groups Projects

fix #9 redirect to configured site url if the protocol or host is wrong

Merged fix #9 redirect to configured site url if the protocol or host is wrong
Merged Alan Bell requested to merge alanbell/vtigercrm:redirect_to_site_URL into master
+ 6
0
Compare changes
  • Side-by-side
  • Inline
+ 6
0
@@ -103,6 +103,12 @@ class Vtiger_WebUI extends Vtiger_EntryPoint {
// common utils api called, depend on this variable right now
$currentUser = $this->getLogin();
vglobal('current_user', $currentUser);
//check we are being connected to on the right host and protocol
global $site_URL;
if ((stripos($site_URL,$_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST']) !== 0)){
header("Location: $site_URL",TRUE,301);
die();
}
global $default_language;
vglobal('default_language', $default_language);
Loading