if my member's profile pages are setup like this ..
http://www.whatever.com/acct_profile.php?acctid=12345
Could i make a php script to let them give out a url like http://www.whatever.com/username
and it would redirect to their profile? in sql , the user id is stored as "ID" and Username as "username"
this must be possible right?
Haven't used it myself, but if you're using Apache it sounds like you might want to check into mod_rewrite. That's just the first article I googled up. You might want to do some searching for some other mod_rewrite tutorials.
Without Using mod re-write , is it possible to create a php script that would be able to do this?
Three ways of doing this:
Create a page for each user. eg www.yoursite.com/justsomeone.php This would just contain a header redirect to the actual page you want them to get to. This could get a little messy as you would need tohave a page for every user.
As above but you would also need to configure apache so that pages without an extension are parsed for php. This would then allow for a url like www.yoursite.com/justsomeone
Reconfigure apache's 404 page to be a php script. Now you don'tneed all those stray files. www.yoursite.com/justsomeone wouldn't actually exist, so you would redirect to your 404 page which coukd tehn extract the "justsomeone" from the url, look it up in your database, construct the "correct" url and then redirect.
Change how your
justsomeone's suggestion of creating a page for each user....
Wouldn't it be possible to just have one page with either switch or if/else commands to redirect each user?
That's pretty much the starting position.