Jump to content

Personal URL on myspace


djoxer

Recommended Posts

Hi everyone,

 

I'm trying to duplicate the same effect on my site that myspace.com has on theirs.  What they do is give each person a unique url that they can use in promotion.  However, when a user clicks, they are sent to a page that is taken from the database.

 

Here is what I mean: 

 

This is the url that I use to go directly to a person's page:  http://www.myspace.com/myuniquename

This is the real url that is brought up:  http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=123456789

 

Myspace uses ColdFusion, but Indieheaven does the same thing with PHP.  Can I do this without creating a lot of folders on my site and redirecting?

 

Thanks,

 

Dan

Link to comment
https://forums.phpfreaks.com/topic/59208-personal-url-on-myspace/
Share on other sites

yes, the idea is you make a special 404 page (unknow location) that would take the url explode it at that slash and then you got the username.  However this  will be a bit over generalzied because it will 404 on eveything you might want to make it more specialized like if $url is in the form on domain.com/subfolder

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.