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?