-2

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!

marketom
  • 47
  • 2
  • 7

1 Answers1

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

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

artur99
  • 818
  • 6
  • 18