by Jenny Gray.
The blog post I referred to above has moved to here http://ltsdevmusings.wordpress.com/2012/04/02/seo-and-moodle/.
I strongly recommend that you use the mod_rewrite and mod_proxy apache plug-ins instead of a Moodle plug-in, as these will work across the entirety of your site without changes to the Moodle code. As I explain in the post, my local plug-in only works with a single (OU) module.
As such, the plug-in isn't suitable for the Moodle plug-ins database. I'm happy to share its principle steps though:
- mod_rewrite calls the plugin controller script
- compare elements with a database table which maps the SEO url to the moodle url (how you get the data in the table is up to you)
- load the appropriate $_GET and $_REQUEST fields with the correct information e.g. $_GET['id'], $_REQUEST['id'] and $_SERVER['request_uri']
- require_once the correct moodle code page.
Trying to do this for every possible moodle page in your site will be quite complex.