Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

domain.com/username (like facebook)

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

domain.com/username (like facebook)

Postby silve69 » Sun Oct 21, 2012 11:22 am

Hello friends,
We have an online app (ExtJS+PHP+MySQL) and currently we have a folder for each user with profile pictures and albums of pictures... and for showing the user profile just needs: www.mydomain.com/users/usernameX
But... my client right now wants to show the profile like facebook: www.mydomain.com/usernameX
How can I do that WITHOUT create hundred of folders in my server root??? (I want to meet the actual structure with all the users folders inside the "users" folder)
Thanks in advanced!!!
Silver
silve69
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sun Oct 21, 2012 11:04 am

Re: domain.com/username (like facebook)

Postby JackRockerfeller » Mon Oct 22, 2012 8:07 am

Hello,

What you need is an apache rewrite rule.

http://httpd.apache.org/docs/current/mod/mod_rewrite.html
JackRockerfeller
New php-forum User
New php-forum User
 
Posts: 4
Joined: Mon Oct 08, 2012 3:11 pm

Re: domain.com/username (like facebook)

Postby silve69 » Mon Oct 22, 2012 8:20 am

Thanks a lot Jack, I'll try!
silve69
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sun Oct 21, 2012 11:04 am


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.