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.
Latest release:
404 sites
136 downloads
10 fans

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

Pokŏż kōmyntŏrze
  • Plugins bot
    wt., 16 maj 2023, 11:10 AM
    Approval issue created: CONTRIB-9270
  • Mão Doãn
    pon., 5 cze 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
    sob., 27 kwi 2024, 00: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.
  • David Pasadas
    niedz., 19 sty 2025, 02:44 AM
    hey
    Thx for the plugin

    How do I redirect from the home page. I don't a url adress with a php extension .php for the home page
  • Csaba Vágvölgyi
    pon., 28 kwi 2025, 15:05 PM
    Dear developers,
    This is a very useful and gap-filling plugin. Are you planning to upgrade to Moodle 4.5 and 5.0?
  • think modular logo
    wt., 15 lip 2025, 21:01 PM
    There is already a version for Moodle 4.5 on the github, could you upload this version to the Moodle plugin directory?
  • Rudraksh Batra
    pon., 1 wrz 2025, 21:48 PM
    Will this current version work on Moodle 5?
  • Rudraksh Batra
    pon., 1 wrz 2025, 21:51 PM
    Also I want that when user register and confirm the link after confirmation it should redirect to custom page instead of default home page, is it possible?
Please login to post comments