Custom Home Page Redirect (local_customhome) is an essential tool designed to take full control of your Moodle instance's front door. It seamlessly redirects users from the default Moodle front page (site-index) to a beautiful custom URL of your choice.
This is incredibly useful if you have a separate website, landing page, or custom HTML page that you want users to see when they visit your root domain, while still keeping your Moodle backend running perfectly.
Additionally, it features an AI Prompt Generator to help you instantly scaffold breathtaking landing pages based on your actual live Moodle data!
Key Features
- Custom Redirection URL: Set any absolute URL to replace the Moodle front page.
- Admin Bypass: Automatically skip the redirect for Site Administrators, ensuring you can still manage Moodle's administrative blocks without locking yourself out.
- Emergency Bypass: Append
?noredirect=1to the end of your site URL to manually skip the redirect for quick testing or emergency access. - AI Prompt Generator: Dynamically fetches your visible Moodle categories/courses and generates a massive, optimized system prompt you can feed into AI tools (Claude, ChatGPT, Bolt, v0) to generate a premium landing page tailored specifically to your site's data!
- No Core Hacks: Accomplishes the redirect cleanly using Moodle's built-in
before_http_headershooks, ensuring your code remains safe across all Moodle core updates.
Configuration & Usage
Once installed, you can configure the plugin by navigating to: Site administration > Plugins > Local plugins > Custom Home Page Redirect
- Custom Home URL (
redirecturl): The absolute URL you want to replace the Moodle front page with (e.g.,https://smartlearn.education/example.html). Leave this empty to disable the redirect completely. - Skip Admin Redirect (
skipadmin): Enabled by default. Logged-in site administrators will not be redirected.
The AI Prompt Generator
To build your new landing page, navigate to the AI Prompt Generator in your plugin settings:
- Provide your branding details, social links, and tone.
- The generator will harvest your live Moodle categories.
- Click "Generate" to receive an elite-level prompt.
- Paste the prompt into an AI of your choice (e.g. Claude Artifacts, v0, Cursor) to instantly generate an ultra-premium, Tailwind-powered
index.htmlfile that you can host as your new custom home!
