-2

想法是将主机名中带有“aaa”的用户组 A 重定向到 url.com/a/,并将主机名中带有“bbb”的用户组 B 发送到 url.com/b/

任何提示将不胜感激!

4

1 回答 1

0
<?php
$path = $_SERVER["DOCUMENT_ROOT"];
//This will get the path where the user is
if($path == "a"){
Header("Location: http://url.com/b/");
//this will redirect the user to b folder
}
?>

这会将 a 文件夹中的用户重定向到 b 文件夹。

于 2014-02-05T12:19:46.873 回答