Page 1 of 1

How to write PHP code to parse URN

Posted: Sun Nov 08, 2009 11:36 pm
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.

Re: How to write PHP code to parse URN

Posted: Mon Nov 09, 2009 9:30 am
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?

Re: How to write PHP code to parse URN

Posted: Mon Nov 09, 2009 9:34 am
by jackpf
Probably something to do with this - http://www.google.com/search?q=apache+m ... =firefox-a

:)

Re: How to write PHP code to parse URN

Posted: Mon Nov 09, 2009 10:13 am
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.

Re: How to write PHP code to parse URN

Posted: Mon Nov 09, 2009 11:58 am
by jackpf
No problem.