Connecting to a Site URL Ending with /

Connecting to a Site URL Ending with /

by Phil Terzic -
Number of replies: 2

I'm trying to connect my app login to a URL that ends in a "/" and will not work without that slash. But the Change site screen shows that the app is trying to connect to the URL with the slash trimmed from the end.


How can I force the app to connect to the proper URL ending with a slash?


ex) http://xxxxxx.xxxx.int/vle/      (correct link)

is being recognized as 

http://xxxxxx.xxxx.int/vle             (incorrect link)

Average of ratings: -
In reply to Phil Terzic

Re: Connecting to a Site URL Ending with /

by Perry Way -

According to the comments in config.php configuration file, you should not include a trailing slash in the URL for Moodle.

//=========================================================================
// 2. WEB SITE LOCATION
//=========================================================================
// Now you need to tell Moodle where it is located. Specify the full
// web address to where moodle has been installed.  If your web site
// is accessible via multiple URLs then choose the most natural one
// that your students would use.  Do not include a trailing slash


We are using IIS and it automagically appends a trailing slash. What web server are you using? Apache? Perhaps you might have to make a rule to redirect "http://<domain>" to "http://<domain>/" which can be done. But again on IIS it's not necessary as the web server wants the trailing slash and so it automatically redirects with a trailing slash.

In reply to Perry Way

Re: Connecting to a Site URL Ending with /

by Phil Terzic -

If I do not include the trailing slash, it does not connect.


I will try to see about the Apache redirect, thanks.