Greetings.
You know how some sites provide custom URL paths like www.myspace.com/fred or www.flubber.com/sally.
The "fred" and the "sally" text appears as a Path in the URL, but I doubt it exists as a real folder in their file structure.
My uninformed guess is that the URL "path" is passed to the host, where it is parsed in some way, where it in turn is used as a variable that points to the right database record.
Anyway...
I heat up my coffee and start looking for how to do something like this.
I look at the PHP getenv, parse_url and other commands. I try out some ideas on my own. All without any luck or good results to report.
So, now I post this as a question to the group.
I desire the user to type in a very simple URL such as www.mysite.com/fred. There is actually no "/fred" path in the host file structure, but the text "fred" is instead passed to PHP as a variable.
Of course, I could easily implement something like having the user type in www.mysite.com?name=fred, but you see, my users (and I) are lazy and forgetfull, and being able to type a simple www.mysite.com/fred would be desired.
There are two aspects of this issue:
Issue#1) Since there is actually no file path ".../fred" on the server, how do I prevent a "page can not be found". Hmmmm.. perhaps I can use htaccess and redirect bad addresses to a common page?
Issue#2) Passing the trailing URL path (eg: "fred") to PHP.
Any thoughts, suggestions or pointers?