Skip to content
Snippets Groups Projects
Commit cb0c6c7c authored by Prasad's avatar Prasad
Browse files

Merge branch 'redirect_to_site_URL' into 'master'

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

See merge request !8
parents ec0cbfe4 da40e090
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment