Re: A few questions...

From: Date: Sun, 25 Mar 2001 23:05:50 +0000
Subject: Re: A few questions...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45532@lists.php.net to get a copy of this message
Chris, a few answers :) On 3/25/01 5:43 PM, "Chris Cocuzzo" <cuzo@mediaone.net> wrote: > hey- > > Alright I noticed that question about URL parsing. I could've sworn I saw > some article on PHPBuilder.com that said that instead of doing all that > modifying with apache, you could simply write something to change the URL > with '?' and '&' and '=' so that they symbols could be > represented using a > simple /, does anyone remember seeing it?... dunno - think it's in the php.ini? > > In any case, I'll ask, what would be the best way to do this with > scripting, something like str_replace() or perhaps a regular expression to > both modify the URL and then allow pages using that modified URL to > recognized the variable/value pairs? Or is that even possible? You could... I'm hacking through using: $path_array = explode('/', $REQUEST_URI); $last_item = array_pop($path_array); $next_to_last_item = array_pop($path_array); / item only drawback is the positional stuff is fixed. now I am trying to figure out how to generate my hrefs in the page to have a matching structure.... > > My other question is this: Sometimes I notice URL's where it looks like > this, http://www.whatever.com/?blah=blah&d=d, or > http://www.whatever.com/local?name=name&d=d. How is that > done, where there > is no file extension after the file name, or no file name at all, just a > question mark directly after the slash? probably the a .htaccess or apache.conf directive: <Location /local> ForceType application/x-httpd-php3 </Location> This would send everything to a script called "local". This is from: http://phpbuilder.com/columns/tim19990117.php3 hth, regards, jaxon > > thanks > Chris >

« previous php.general (#45532) next »