How to write PHP code to parse URN

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
registereduser
Forum Newbie
Posts: 21
Joined: Wed Nov 04, 2009 2:09 pm

How to write PHP code to parse URN

Post by registereduser »

Let us say the url for a blog is http://www.blog.com/myblog. I would assume there is no such php file located at http://www.blog.com/myblog/default.php. I do not even think there is directory called /myblog there. What I believe is when server receives this url submission, it would query the database to get the result based on the urn of /myblog.

Correct me if my assumption is wrong. If my assumption is right, or I would like to do that way, how to write such codes?

Thanks a lot. I tried to search google but could not get any information about this. I guess I did not get the right key words for this.
registereduser
Forum Newbie
Posts: 21
Joined: Wed Nov 04, 2009 2:09 pm

Re: How to write PHP code to parse URN

Post by registereduser »

My question indeed is neither about the parse_url, nor how to retrieve the data according to /myblog. My question is about the structure of php files. Since /myblog does not really exist, how the home page such as index.html or index.php being triggered?
Last edited by registereduser on Mon Nov 09, 2009 9:59 am, edited 2 times in total.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: How to write PHP code to parse URN

Post by jackpf »

Probably something to do with this - http://www.google.com/search?q=apache+m ... =firefox-a

:)
registereduser
Forum Newbie
Posts: 21
Joined: Wed Nov 04, 2009 2:09 pm

Re: How to write PHP code to parse URN

Post by registereduser »

jackpf wrote:Probably something to do with this - http://www.google.com/search?q=apache+m ... =firefox-a

:)
Thanks jackpf. This is what I am looking for.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: How to write PHP code to parse URN

Post by jackpf »

No problem.
Post Reply