note 89114 deleted from function.parse-url by danbrown

From: Date: Sun, 22 Feb 2009 19:46:23 +0000
Subject: note 89114 deleted from function.parse-url by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150958@lists.php.net to get a copy of this message
Note Submitter: Martin Furious ---- Hello everyone. I want to handle the variables, values, etc. with mod_rewrite (just to redirect all request to index.php, that's done yet). The problem is that i want the urls look like /<category>/<post-name> or /<user>/<friends> ,etc. The old way is to create a separate rule for everything, but i want to do it php style. I'm talking about the controllers of most frameworks. I want to write my own handling and i dont know exactly how. I searched the site and i'm here. I can get the exact path with parse_url (i'm saying path, cause links like those above are detected in parse_url's path line). So my exact problem is that im not so sure how to get my work done. Im thinking of something like exploding "/" and all my modules will be explode[1] and every next thing in the url will be parameter... or something... Any idea?

« previous php.notes (#150958) next »