PHP - User Profile URL From Ugly URL -


alright, try figure things out on own, stumbled. making php registration/login/profile system php , sql. 97% finished, users' profiles.

i have form can search users. form links "www.example.com/profiles.php?username=." can link "www.example.com/user/" or "www.example.com/profile/." functionality of going directly "user/" url.

i sure there rewrite rules this, , have tried many. still seem have trouble getting work. help? in advance.

here current .htaccess file (doesn't work):

rewriteengine on rewriterule ^user/([^/]*)\.php$ /profile.php?username=$1 [l] 

if htaccess work, should linking to? because currently, linking "/profile.php?username=" doesn't anything.

again, clarify, want output form able link www.example.com/profile/username or www.example.com/user/username. user access profile typing www.example.com/profile/username.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -