Can anyone more familiar with Apache RedirectMatch give me the correct magic to redirect:
http://moodle.org/bugs/bug.php?op=show&bugid=xxxx
and bugid embedded in other parameters:
http://moodle.org/bugs/bug.php?op=show&bugid=xxxx&blah=blah
to
http://tracker.moodle.org/browse/MDL-xxxx
Sorry, but I don't think RedirectMatch is enough for that complex statement. If you could use mod_rewrite, then the rule woud look like this:
http://tracker.moodle.org/browse/MDL-1234?op=show&bugid=1234&blah=blah
Of course, you can ignore the part after the "?", but I'm sure that someone else can improve my solution.
Cheers,
Pablo
RewriteEngine onI just tested it and worked like a charm, EXCEPT that the final URL looks like this:
RewriteCond %{QUERY_STRING} ^op=show&bugid=([0-9]+)&?(.*)$
RewriteRule ^bugs/bug.php$ http://tracker.moodle.org/browse/MDL-%1 [R,L]
http://tracker.moodle.org/browse/MDL-1234?op=show&bugid=1234&blah=blah
Of course, you can ignore the part after the "?", but I'm sure that someone else can improve my solution.
Cheers,
Pablo
Isn't it
RewriteRule ^bugs/bug.php$ http://tracker.moodle.org/browse/MDL-$1 [R,L]with a $ (dollar) sign instead of a % (per-cent) ?