Commit 1466e7da authored by Francois Marier's avatar Francois Marier Committed by Gerrit Code Review
Browse files

Merge "Add trailing slash autocorrection for wwwroot (bug #745426)"

parents f9b061dd 577019db
......@@ -55,12 +55,14 @@ $cfg->dbprefix = '';
// wwwroot - the web-visible path to your Mahara installation
// Normally, this is automatically detected - if it doesn't work for you
// then try specifying it here
// This value must end with a /
//$cfg->wwwroot = 'http://myhost.com/mahara/';
// You will only need to specify this if you want to use HTTPS for
// logins, but not for regular pages. If you want to serve all of your
// Mahara content via HTTPS, just set $cfg->wwwroot to use HTTPS instead.
//$cfg->httpswwwroot = 'https://myhost.com/mahara';
// This value must end with a /
//$cfg->httpswwwroot = 'https://myhost.com/mahara/';
// dataroot - uploaded files are stored here
// This is a ABSOLUTE FILESYSTEM PATH. This is NOT a URL.
......
......@@ -185,6 +185,11 @@ if (!isset($CFG->wwwroot) && isset($_SERVER['HTTP_HOST'])) {
$CFG->wwwroot = $wwwroot;
}
}
if (isset($CFG->wwwroot)) {
if (substr($CFG->wwwroot, -1, 1) != '/') {
$CFG->wwwroot .= '/';
}
}
if (isset($CFG->httpswwwroot)) {
if (substr($CFG->httpswwwroot, -1, 1) != '/') {
$CFG->httpswwwroot .= '/';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment