Re: [PHP] strange php url (CORRECTION)

2006-04-28 Thread Kevin Kinsey
Kevin Kinsey wrote: Pretty good thoughts, there. Some years ago, Tim Perdue (of PHPBuilder and SourceForge fame) had a popular article on "Search Engine Friendly URL's" (or some such), in which he described use of the Apache ForceLocal directive to make a site just One Big Script, parsing the

Re: [PHP] strange php url

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 8:10 am, Ahmed Saad wrote: > On 4/21/06, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: >> redirects to: >> http://www.example.com/index.php?action=edit&type=customer&id=1234&adminaccess=1 > > > and you put admin access flags (read, determine roles) in URL > parameters? Hope

Re: [PHP] strange php url

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 1:58 am, nicolas figaro wrote: > On my server, the building of some webpages with url like the one > below > produces a loop > and crashes the server. > (http://myurl.mydomain/path/index.php/path/index.php). Odds are VERY GOOD that you have some kind of bad regex in your htt

Re: [PHP] strange php url

2006-04-24 Thread Ahmed Saad
On 4/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > redirects to: > http://www.example.com/index.php?action=edit&type=customer&id=1234&adminaccess=1 and you put admin access flags (read, determine roles) in URL parameters? -ahmed

Re: [PHP] strange php url

2006-04-24 Thread nicolas figaro
Hi all and thanks for the answers. On my server, the building of some webpages with url like the one below produces a loop and crashes the server. (http://myurl.mydomain/path/index.php/path/index.php). As I never heard about the PATH_INFO before, I'm not sure the site uses this value. (I'll

Re: [PHP] strange php url

2006-04-21 Thread Richard Lynch
On Fri, April 21, 2006 1:11 pm, [EMAIL PROTECTED] wrote: > You could do that... a "poor man's mod_rewrite" might involve > something like this and making the main PHP parsing script your 404 > page.. so no matter where you went on a page, the 404 redirect to your > PHP script would parse the reques

Re: [PHP] strange php url

2006-04-21 Thread Richard Lynch
On Fri, April 21, 2006 10:04 am, nicolas figaro wrote: > could anyone tell me why the following url doesn't generate a "page > not > found" ? > http://www.php.net/manual/en/function.checkdnsrr.php/manual/ > > you can try with a longer url after the last .php. > > I tried with ../manual instead of m

Re: [PHP] strange php url

2006-04-21 Thread tg-php
All depends on how the data is used after it's interpreted/split: http://www.example.com/index.php/edit/customer/1234 $action = "edit"; $type = "customer"; $id = "1234"; header("Location: http://www.example.com/index.php?action=$action&type=$type&id=$id";); In this case, what happens if someo

Re: [PHP] strange php url

2006-04-21 Thread Joe Wollard
No arguments here ;-). For what it's worth, I've used this technique just to simply clean up the url's a bit. With that in mind, I usually don't need to do a terrible amount of scrubbing because I'm using the variables in the url more for navigation. So http://www.example.com/index.php/edit/custome

Re: [PHP] strange php url

2006-04-21 Thread tg-php
You could do that... a "poor man's mod_rewrite" might involve something like this and making the main PHP parsing script your 404 page.. so no matter where you went on a page, the 404 redirect to your PHP script would parse the request (or would you get the post-redirected URL? in which case you

Re: [PHP] strange php url

2006-04-21 Thread Joe Wollard
I believe Kevin is on the right track there. To expand a bit, you can use $_SERVER['PATH_INFO'] with these urls instead of $_GET to make use of the data it contains example for url http://www.example.com/index.php/foo/bar produces: /foo/bar You can then parse this string, (generally by using th

Re: [PHP] strange php url

2006-04-21 Thread Kevin Kinsey
Hi, could anyone tell me why the following url doesn't generate a "page not found" ? http://www.php.net/manual/en/function.checkdnsrr.php/manual/ you can try with a longer url after the last .php. I tried with ../manual instead of manual and this produces a 404. I checked with www.php.net

Re: [PHP] strange php url

2006-04-21 Thread tg-php
Not sure about php.net specifically, but two things to note here: If you leave off a filename at the end of the URL, the web server will look for a 'default' document. On apache and unix systems I believe the default is "index.html" and on IIS systems it's something like "Default.htm". Most of