Friday, November 30, 2012

Re: IIS 7, CakePHP 2.2.3 and the Blog Tutorial

On Fri, Nov 30, 2012 at 8:51 AM, Jorick de Lange
<jorickdelange@gmail.com> wrote:
> OK... So, what I've got now:
>
> Working
> - dev.ov-ervaringen.nl/
> - dev.ov-ervaringen.nl/posts/index
>
> Not working:
> - dev.ov-ervaringen.nl/index.php

You shouldn't add "index.php" to the URL. The Rewrite Rules work by
passing the arguments in the URL to the index.php file, which in turn
passes them on to the Dispatcher. It first searches for an actual file
under app/webroot, eg. my-static-page.html. If found, it serves it and
that's the end of the request. Otherwise, everything else is already
going to index.php.

Another way of looking at it: index.php and index are two separate
things. The latter is named so because the action is to list all
records of some model. The former is named so because, historically,
web servers would default to listing all of the pages in a given
folder if no filename was given in the URL. Eventually, it was
possible to set a DefaultDocument name, so that the web server would
look for a file with that name and show that instead of listing all
the files. Traditionally, this was called index.html, index.php, etc.
Cake's app/webroot/index.php could actually be named anything else, as
long as the web server was configured for that name as
DefaultDocument.

I hope I didn't just confuse things even more.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.

No comments: