/    Sign up×
Community /Pin to ProfileBookmark

Help needed — howto mybloghost.com/username

Hello everybody,

I am wondering how, (for instance) blog sites or [url]www.myspace.com[/url], let people make their own dynamic pages. I’m currently working on a website where people should make and maintain there own pages eventually.

How do i get a string in an url to get information out of my database. Like with myspaces.com, where (for example) [url]http://www.myspace.com/mike[/url] gets all info about mike and [url]http://www.myspace.com/john[/url] get all info about john (random names)

And finally is there any code/tutorial available for this?

I dont even know where to start on this one so all help is welcome. Thanks for your time.

Kind regards,

Tim
The Netherlands

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@valenokJul 20.2006 — $_SERVER["PHP_SELF"]

$_
SERVER["SCRIPT_NAME"]

$_SERVER["REQUEST_URI"]

host.com/james equals to /james/index.php
Copy linkTweet thisAlerts:
@The_Little_GuyJul 20.2006 — I would like to know the same thing.

I am making portfolio host. and I want the user to have:

mysite.com/tim

mysite.com/joe

mysite.com/billy

etc. etc.

My closest guess of how this is done, is that it takes the below links, and converts them.

mysite.com/index.php?user=tim

mysite.com/index.php?user=joe

mysite.com/index.php?user=billy

otherwise there is a directory for each user and they all have there own index.php
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYJul 20.2006 — nah it's called "cruft-free" URLs, there are a lot of articles about those if you search. You have to create a apache htaccess to transform the adress,

that means for example if the user types:

http://www.domain.com/lcf/blog/2006

if will be read as http://www.domain.com/index.php?user=lcf&page=blog&year=2006 (example)

further infos: http://www.ryanbrill.com/archives/cruft-free-urls/
×

Success!

Help @Spes spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.9,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...