0

I am programming a website using HTML/CSS, JS and PHP. I want to have a unique url for every user (uniqueness of username is already given) in this form: example.com/{USER} that executes a php script "example.php" to display a website based on database entries of {USER}. There are some other php sites that exist.

I thought of redirecting from example.com/{USER} to example.com/example.php?{USER}, but I think it will also redirect from example.com/index.php to example.com/example.php?index.php .

How can I solve this?

daddel69
  • 1
  • 3
  • Problem is easily solved by using a php framework that includes routing (of which there are many choices) – charlietfl Mar 20 '21 at 14:02
  • It's not clear where do you want to redirect a user, on the client or on the server, and how is CSS related to the question? – Teemu Mar 20 '21 at 14:03

0 Answers0