0

Im having trouble with my XAMPP website. I want to make a sort of profile like thing where users type (for example) https://howcoolitis.net/profile/useridhere

but that ends up just giving an error.

To be sincere, for the i have tried thing, There is not anything that i have tried apart from google searching similar like items, I don't really know what it is called to be honest, since i have never used it before but I want to use it.


if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') 
    $url = "https"; 
else
    $url = "http"; 

// Here append the common URL characters. 
$url .= "://"; 

// Append the host(domain name, ip) to the URL. 
$url .= $_SERVER['HTTP_HOST']; 

// Append the requested resource location to the URL 
$url .= $_SERVER['REQUEST_URI']; 

// Print the link
$pos = strrpos($url, '/');
$search = $pos === false ? $url : substr($url, $pos + 1);

I was expecting for it to just give me the text after the url but it just gives a 404.

frionx
  • 15
  • 7
  • Sorry, but your question is completely unclear. What does that php code snippet have to do with your question and the proposed profile URL you mention? And what "text" do you refer to, since no such thing is shown in that snippet? – arkascha Sep 14 '19 at 06:51
  • I already finished it. I meant the htaccess, url reqrite, I did not know at the time. – frionx Sep 15 '19 at 17:43
  • Which does not answer the question I asked at all, nor did it make the question you asked more clear. Since this sites lives from questions that are helpful to others, which this one certainly is not without any answer, I suggest that you delete it. Thanks! – arkascha Sep 15 '19 at 18:44

0 Answers0