Moodle — Custom Clean URL

If you use Moodle, you've probably seen links like: yourmoodle.com/course/view.php?id=123 These are hard to remember, unfriendly for users, and not great for branding. That's why I built customcleanurl — a Moodle plugin that converts those links into clean, readable, and SEO-friendly URLs. Also this plugin lets you define custom URLs for existing Moodle pages and provides a custom 404 template for a better user experience. Additionally, it also provide the option to redirect old URL into new/next URL.

Check out the plugin here: Moodle Plugins directory | Github Repository

What It Does

The customcleanurl plugin transforms Moodle's technical-looking URLs into clean, readable formats:

  1. Course View Page URL: your_domain/course/view.php?id=ID => your_domain/course/course_shot_name
  2. Course Category Page URL: your_domain/course/index.php?categoryid=ID => your_domain/course/category/ID/category_name
  3. Course Edit Page URL: your_domain/course/edit.php?id=ID => your_domain/course/edit/course_shot_name
  4. User Profile URL: your_domain/user/profile.php?id=ID => your_domain/user/profile/username
  5. Other as defined like: your_domain/mod/page/view.php?id=ID => your_domain/about-us

Installation Steps

  1. Download the plugin from Moodle Repositiory or GitHub and place it into your Moodle installation
  2. Add rewrite rules to your server .htaccess (or web server config):
# BEGIN_MOODLE_LOCAL_CUSTOMCLEANURL
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /local/customcleanurl/route.php [L]
ErrorDocument 403 /local/customcleanurl/404.php
ErrorDocument 404 /local/customcleanurl/404.php
# END_MOODLE_LOCAL_CUSTOMCLEANURL
None
Plugin setting page (Instruction to setup htaccess configuration, If not setup successfully.)
None
Define Custom URL
None
Define Redirect URL.

Final Say

If you manage a Moodle site and want cleaner, brand-aligned, and more SEO-friendly URLs, the customcleanurl plugin is a must-try. It improves usability, helps with branding, and makes Moodle links as human-friendly as they should be.

Download now: Custom Clean URL