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 manual and this produces a 404.
>
> I checked with www.php.net because my own site does the same and I
> wanted to be sure it didn't come from my config.

Because it is incredibly USEFUL to have extra information in the URL
after the actual script that does the work.

Because that URL does, in fact, point to a valid document.

Because the "/manual" part is just passed in to the
'function.checkdnsrr.php' script.

Actually, that last statement is quite possible a lie.

It's quite possible that what YOU think of as the
'function.checkdnsrr.php' page is actually a script named 'manual'

And that the script named 'manual' looks for things like '/en' and
'/function.checkdnsrr.php' in order to determine what page to serve
up.

You could read the php.net source to find out for sure, by clicking on
the link in the bottom right corner of the PHP website.

To try this out on your own server, do this:

1. Create a file called 'myscript.php'

2. Put this in it:
<?php echo $_SERVER['PATH_INFO'];?>

3. Surf to these two URLs:
http://yoursite.com/myscript.php/foo
http://yoursite.com/myscript.php/bar

There are all sorts of uses for this kind of thing, and you'll end up
hearing me rant more about some of them if you stick around :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to