Hello, I have developed a program in PHP & MySQL and there is a membership section. After the member login the page goes to http://www.mydomain.com/member.php . All the functions are working properly. In my membership program user name of every user is unique. The issue is that at this moment I wish to show the URL of the member page after login as follows: http://www.mydomain.com/bluebell/member.php . Here bluebell is the user name. So, the main thing I need that the member.php page will be shown after the respective member's username (/member/) in the URL. Is there any procedure that the member.php page wiil open but in the URL the above format will be shown. As, the full project has already been completed and I am very confused if I have to change the codes a lot or not. I am not familiar with MOD rewrite function. Please suggest and if possible provide me a sample code of this type URL conversion. Thanks...
if you want to do it on an application level, you can use parse_url, and then some logic to get the member name. Make sure to sanitise the url to protect against any injection attack.
If you wanted to get around the mod_rewrite (or the parse_url technique that jestep suggested), you could do something similar to: http://www.mydomain.com/member.php?name=bluebell Code (markup): Or even if you wanted to use mod_rewrite with that, you could rewrite that url format above to this: http://www.mydomain.com/member/bluebell Code (markup): -------- Now mentioning the parse_url concept, you still need to use mod_rewrite to make it work. (unless you did member.php/bluebell)