Redirects

Administration tools ::: tool_redirects
Maintained by Catalyst IT
A very simple plugin which allows admin to set redirects based on url. Redirects can be from existing Moodle pages like from one course to another, or they can be 'vanity' urls from non existing urls into a page inside Moodle.

Redirects 2025080603

Moodle 4.1, 4.2, 4.3, 4.4, 4.5
Released: Friday, 8 August 2025, 10:33 AM

ci

Configurable redirects for Moodle

A very simple plugin which allows admin to set redirects based on url. Redirects can be from existing Moodle pages like from one course to another, or they can be 'vanity' urls from non existing urls into a page inside Moodle.

Branches

Moodle version Branch PHP
Moodle 4.1+ MOODLE_401_STABLE 7.4+

Installation

Using git submodule:

git submodule add git@github.com:catalyst/moodle-tool_redirects.git admin/tool/redirects

OR you can download as a zip from github

https://github.com/catalyst/moodle-tool_redirects/archive/master.zip

Extract this into /var/www/yourmoodle/admin/tool/redirects

Then run the moodle upgrade as normal.

https://docs.moodle.org/en/Installing_plugins

Configuration

  • Navigate to Site Administration > Plugins > Admin tools > Redirects
  • Add rules. Each line should be a redirect rule like [php regex of local moodle URL to redirect from]=>[any URL to redirect to]. E.g. #/my/#=>/course/view.php?id=2
  • Enable or disable redirects for administrators

If you wish to use redirects for urls which do not exist, eg /some-vanity-url then your webserver needs to be configured to have Moodle handle error pages. Setup details are here:

https://docs.moodle.org/dev/Error_pages

Backdoor option for Admins

Admins can bypass redirect by adding noredirect=1 parameter to requested URL. E.g. http://moodle.example.com/my/?noredirect=1

Contributing and Support

Issues, and pull requests using github are welcome and encouraged!

https://github.com/catalyst/moodle-tool_redirects/issues

If you would like commercial support or would like to sponsor additional improvements to this plugin please contact us:

https://www.catalyst-au.net/contact-us

Crafted by Catalyst IT

This plugin was developed by Catalyst IT Australia:

https://www.catalyst-au.net/

Catalyst IT

Version information

Version build number
2025080603
Version release name
2025080603
Maturity
Stable version
MD5 Sum
e6f42036ead480f43e7448d2235d2923
Supported software
Moodle 4.1, Moodle 4.2, Moodle 4.3, Moodle 4.4, Moodle 4.5
  • Latest release for Moodle 4.1
  • Latest release for Moodle 4.2
  • Latest release for Moodle 4.3
  • Latest release for Moodle 4.4
  • Latest release for Moodle 4.5

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
MOODLE_401_STABLE

Default installation instructions for plugins of the type Administration tools

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder (eg "mytool") in the "admin/tool" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation