I believe PHP will do the job, so I will tell you about it. First get the URL of the page, then split it to get mycompany and save it in a variable. Now let PHP load a new page with a variable ...
<?php
$URL = ($_SERVER['HTTPS'])=='on'?'https':'http'.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$companyName = explode('/',$URL);
$URL = 'http://localhost/anything/'.$comapnyName[3];
header('Location: http://localhost/anything/'.$companyName[3]);
exit();
?>
this will do it using PHP ...
sikas source
share