I’m putting together user pages based on the username in the URL. for example blank.com/username
I was able to get a script to get the user name:
$pageName = basename($_SERVER["REQUEST_URI"]);
now, when you got to blank.com/username it obviously takes you to a page that doesn’t exist. how do I redirect to the page they are suppose to go to?
Try using .htaccess to send the requests to your desired PHP file. This is assuming your server is running Apache and supports mod_rewrite.
index.php is the file with your
$pageName = basename($_SERVER["REQUEST_URI"]);