Yacc
example.com/sites.php
Код:
<?php
$name = end(explode('/', $_SERVER['REQUEST_URI']));
$sites = array(
'actionmatures' => 'http://actionmatures.com',
'ferronetwork.html' => 'http://ferronetwork.com',
'kissmatures.com' => 'http://kissmatures.com'
);
if (array_key_exists($name, $sites)) {header('Location:'.$sites[$name]);}
else {header('Location:/');}
?>
example.com/go/.htaccess
Код:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /go/
RewriteRule ^(.+) /sites.php/$1 [L]
</IfModule>
Редиректит все ссылки вида example.com/go/*:
example.com/go/actionmatures
example.com/go/sites/actionmatures
example.com/go/sponsors/sites/actionmatures
и т.п.