Relative Moodle Links

Relative Moodle Links

ដោយ Howard Miller នៅ
ចំនួនតប៖ 1
រូបភាព Core developers រូបភាព Documentation writers រូបភាព Particularly helpful Moodlers រូបភាព Peer reviewers រូបភាព Plugin developers
When putting in a link from one part of a moodle site to another, it is easy enough to do by copying the address line of the target page.

However, this address will be absolute, which is fine until you have to move the site to another server or similar.

Is there anyway to construct these links such that they are all relative to the site?
មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Howard Miller

Re: Relative Moodle Links

ដោយ Martin Dougiamas នៅ
រូបភាព Core developers រូបភាព Documentation writers រូបភាព Moodle HQ រូបភាព Particularly helpful Moodlers រូបភាព Plugin developers រូបភាព Testers
Just use everything after the DNS name:

  <a href="/mod/forum/discuss.php?d=1131">link</a>

You just have to be sure that

http://oldsite.com/    -->  http://newsite.com/

or

http://oldsite.com/moodle    -->  http://newsite.com/moodle

but not:

http://oldsite.com/moodle    -->  http://newsite.com/mycourses
មធ្យមភាគនៃរង្វាយតម្លៃ: -