I need to create a vanity URL redirect using htaccess and PHP.
My requirements are:
If a user writes
The client will be redirected to for example:
profile.php?user=foobar in either the /users/ directory or the root directory. Possibly in an /inc/ folder in the root directory.
www.example.com redirect is also necessary.
The URL needs to stay same visually. I would like all of this in a single .htaccess file.
I would also like (although not a requirement) the redirect to also be applied on
I have not found any answers that does this.