Jump to content

[SOLVED] Creating URLs for users in my site


npsari

Recommended Posts

Hi there,

 

I have a community website

 

At the moment, the way of seeing a user's profile is ...

 

http://www.example.com/users.php?user=7

 

But now, I want users to have a real link

 

http://www.example.com/sara

 

 

Like Myspace does, which allows you to choose an URL

 

How does a website do that, do i create folders for users in my public folder directory

is that how it is done?

 

What if there is thousands of users... Will i end up having thousands of folders in my public directory

 

So, Myspace has billions of folders then

 

Can you tell me how this is done

Link to comment
Share on other sites

noo thats what i thought at 1st also then i learned about mod rewrite it is bassed off gets so what the url is really is http://www.example.com/users.php?user=7

but the users see

http://www.example.com/sara

 

look at my site. http://stangle.info/sstangle73 shows my profile

also this will http://stangle.info/profile.php?username=sstangle73

Link to comment
Share on other sites

Your website looks cool, but it asks me to register so i can see that page, well, i might register to see whats crackin there

 

anyway, thanks for the info

 

I will try to study theis MOD thing, and see what happens from there

 

But that site looks like a software or something, http://www.mod-rewrite-wizard.com/

 

isnt there like a php script which i can use

Link to comment
Share on other sites

Just to clarify somethings from my side

 

That code you gave me should be between php tags?

 

<?
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ users.php?user=$1 [L]
?>

and where is the part where i identify $1

 

Is there a link which i can read about all that stuff guys

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.