Page 1 of 1

example.com/members/username

Posted: Mon Mar 31, 2014 5:05 pm
by 8803286
Hi i'm trying to do like this:

http://example.com/members/username

Then the profile of that user will come up.

But idk how to do it.

Only know how to do /members/?u=username


I'M SORRY FOR MY ENGLISH!

Re: example.com/members/username

Posted: Mon Mar 31, 2014 5:08 pm
by requinix
It's called URL rewriting. Exactly how you do it depends on your web server; most people have Apache and end up with something in their .htaccess looking like

Code: Select all

RewriteEngine on
RewriteRule ^/?members/([^/]+) /members/index.php?u=$1 [L]
Keep in mind that URL rewriting only lets you handle URLs like "/members/username" - you still have to output them in your HTML manually.

Re: example.com/members/username

Posted: Mon Mar 31, 2014 5:29 pm
by 8803286
Thanks