Hi.
I had in my "config.php" file the variable wwwroot set as: "http://www.myserver.com/moodledir".(Moodle is in an Intranet Server, not a public IP)
All was right until I noticed many people have to access moodle from abroad through a firewall by means of a URL:port translation.
(They type http://fw.domain.com:port (Public IP) and the firewall sends them to the internal intranet server)
The problem is that as they access by the firewall, when they click an absolute link within moodle they receive the "Page not found" message, so I need the all the moodle links to be relative.
How could I achieve this?
I have set the wwwroot variable to "/moodledir". Is it a good idea?
Do I have to change some links in the database?
Thanks.
Good hack for the subscription process! Unfortunately, the links in email sent from forums will still not work. Is it possible to set things up so the intranet people ALSO access the site via http://fw.domain.com:port ?
Hi.
Sending all people requests through the firewall could collapse the firewall and I think the Intranet interaction would become slower.
Mmmm, there are about 200 students which are on the Intranet. Only 2-3 teachers are about to access by the firewall.
The problem is on the teachers roof I guess.
The links in the emails starts all with :
"http://www.moodleserver.com/...."
The teachers then have to replace manually the string with "fw.domain.com:port"...
If I could guess the recipient of the email, then i could send a customised email to
these teachers. Could I?
Example: (next to de code that sets up and sends the email):
if recipient="name@server.es" then
link="http://fw....."
endif
Is it possible?
Where should I put this code?
Thanks!!!!!!!!!
Sending all people requests through the firewall could collapse the firewall and I think the Intranet interaction would become slower.
Mmmm, there are about 200 students which are on the Intranet. Only 2-3 teachers are about to access by the firewall.
The problem is on the teachers roof I guess.
The links in the emails starts all with :
"http://www.moodleserver.com/...."
The teachers then have to replace manually the string with "fw.domain.com:port"...
If I could guess the recipient of the email, then i could send a customised email to
these teachers. Could I?
Example: (next to de code that sets up and sends the email):
if recipient="name@server.es" then
link="http://fw....."
endif
Is it possible?
Where should I put this code?
Thanks!!!!!!!!!
It would be a very nasty hack, but you could put such code inside the _cron functions for each module (in the lib.php file).
For example, in mod/forum/lib.php is a forum_cron() function.
At the very top of that function put a
$wwwroot = $CFG->wwwroot; // to remember itthen inside the loop:
if ($userto->email == "blah@blah.com" ....) { $CFG->wwwroot = "http://fw....."; } else { $CFG->wwwroot = $wwwroot; }
It recently occurred to me that you could use two Moodle installations that share one database!
http://moodle.org/mod/forum/discuss.php?d=777&parent=3340
http://moodle.org/mod/forum/discuss.php?d=777&parent=3340