문제

The idea is to redirect the user group A with "aaa" in their hostname to url.com/a/ and send user group B with "bbb" in their hostname to url.com/b/

Would appreciate any hint!

도움이 되었습니까?

해결책

<?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
}
?>

This will redirect a user that is in the a folder to the b folder.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top