note 89114 added to function.parse-url

From: Date: Sun, 22 Feb 2009 19:29:04 +0000
Subject: note 89114 added to function.parse-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-150955@lists.php.net to get a copy of this message
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? ---- Server IP: 89.190.194.18 Probable Submitter: 88.203.241.122 ---- Manual Page -- http://www.php.net/manual/en/function.parse-url.php Edit -- https://master.php.net/note/edit/89114 Del: integrated -- https://master.php.net/note/delete/89114/integrated Del: useless -- https://master.php.net/note/delete/89114/useless Del: bad code -- https://master.php.net/note/delete/89114/bad+code Del: spam -- https://master.php.net/note/delete/89114/spam Del: non-english -- https://master.php.net/note/delete/89114/non-english Del: in docs -- https://master.php.net/note/delete/89114/in+docs Del: other reasons-- https://master.php.net/note/delete/89114 Reject -- https://master.php.net/note/reject/89114 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150955) next »