Very mini-how-to for doing redirects with Aegir CMS 1.0 RC1

Because Midgard overrides the apache RedirectMatch directive, when using Aegir
one must create the equivalent funtionality.

Context for example:

trying to redirect all* requests

0. Login to Aegir as the admin user.

1. Create a new page (mailman) by clicking on the
on and then ‘New’ and then use the
the ‘Subpage’ area to create a page called ‘mailman’.

2. Set the newly created page to ‘Active’ by
clicking on the page then ‘Edit’ then ‘Details’.
Set the ‘Style:’ to ‘/Empty(Shared)’.  For the
‘Authentication:’ select ‘active’.

3. Create a new page element under the ‘mailman’ page
by clicking on the mailman page and then ‘New’ and
then in the ‘Page element’ area enter the text ‘code-init’.
(four elements are called automatically by midgard in the
following order: code-compat,code-global,code-init and ROOT.)

4. Click on the page-element and then ‘Edit’. Add the following
php code to the page-element


$i = 0;
$path = ‘/mailman’;
while ($i <= $argc)
$path = $path.”/$argv[$i]”;


For more information about this step, please refer to


This will now mimic the effect of an apache RedirectMatch
that reads,

RedirectMatch /mailman(.*)$1