Mecha CMS

Mecha CMS blog and documentation.

Addon Domain Redirection

Redirect from base domain to alternate domain with PHP.

// Redirect from `http://example-1.com/dir/*` to `http://example-2.com/*`
if ($url->host === 'example-1.com' && $url->directory === '/dir') {
    Guard::kick($url->protocol . 'example-2.com' . $url->path);
}