Reputation: 167
Kind of simple i would assume, but can't seem to find any answers here which will help me out.
Basically instead of displaying
www.example.com/profile.php
I want to display the username of the person which is logged in.
www.example.com/JoeMason
Is there any simple method to achieve this?#
Thanks
Upvotes: 0
Views: 398
Reputation: 4623
you can use a rewrite rule to o this, to change from
www.example.com/profile.php?user=JoeMason
to
www.example.com/JoeMason
see the .htaccess or rewrite rule in the nginx conf
Upvotes: 0
Reputation: 13257
Yes, you can use mod rewrite to rewrite www.example.com/JoeMason to www.example.com/profile.php?name=JoeMason
Try adding this to your .htaccess file:
RewriteEngine On
RewriteRule ^/(.*)/$ http://www.example.com/profile.php?name=$1 [L]
Upvotes: 1