插件管理工具稳定版

Redirects

tool_redirectsCatalyst IT

  • Moodle 1.9–5.1
  • 更新 2025-08-08

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.
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
Setup vanity urls using Moodle Error pages
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

返回插件目录