Redirects

Administration tool ::: 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.
Latest release:
121 sites
139 downloads
6 fans
Current versions available: 1

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

Screenshots

Screenshot #0

Contributors

Catalyst IT (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Plugins bot
    Tue, 16 May 2023, 11:10 AM
    Approval issue created: CONTRIB-9270
  • Mão Doãn
    Mon, 5 June 2023, 11:43 AM
    Thank you for your plugin. How can I redirect from my hompage example.com to /login/index.php? I added #\/#=>/login/index.php but it's ridirecting all pages to /login/index.php. Thank you very much.
  • Ezzeddin Hamed
    Sat, 27 Apr 2024, 12:16 AM
    Mão Doãn, I have not tried it in this plugin, but did you try to force login. Visit Administration > Security > Site security settings, then find the setting for it; anyone visits the homepage will be redirected to login page.
Please login to post comments