Question: Some sites (for example, certain implementations of mediawiki,) have a uri format of `http://example.com/index.php/SOME_PAGE`. How is this done? Is index.php just a directory on the server that happens to be named like a php file and that actually contains a file named `SOME_PAGE`? If so, why name it like that? If not (i.e. it actually *does* represent some sort of legitimate PHP file), then what would the contents of the look like?

Answer: 
It is not behaving like a directory, it just looks like it is.

index.php is a regular php file.

[Here's a tutorial](http://www.evanbot.com/article/fancy-urls-without-mod_rewrite/3) on how to do this with only PHP code. The issue with this is that you are only getting values and you have meaningless key's in your code.

Example from the tutorial, is he is calling index.php/about/Evan/2

To get `about` from the url, he fetches

```
$url[0]

```

That's not very meaningful is it?
Those sites rewrite incoming requests to point to the actual resources on the server using web server modules such as apache's [mod\_rewrite](http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html).