I have a domain name say for example : www.example.com I would like to get a dynamic data using PHP that is after this domain name. Example : www.example.com/samsung.
This samsung shall be anything that a user comes from. I want to get this samsung in my PHP. The major problem here is that when ever I open this www.example.com/samsung or www.example.com/vivo page the browser goes to vivo directory and throws a 404 error.
For now I have solved getting the data from this format : www.example.com/?samsung
<?php
$key = array_search('', $_GET);
echo $key;
?>
But I want to get rid of the ?
and have a pure www.example.com/samsung type.