NYCPHP Meetup

NYPHP.org

[nycphp-talk] mod_rewrite -- what's the big deal?

csnyder chsnyder at gmail.com
Tue Oct 3 12:01:54 EDT 2006


On 10/3/06, Cliff Hirsch <cliff at pinestream.com> wrote:
> I don't use a Framework or a true MVC architecture -- I think. It's more
> like Cliff's hack. But to my defense, I do use a single entry point
> (index.php) that dispatches requests via
> ?page=somepage&action=someaction&other params as required.
>
> So where would I go from here? And don't say scrap your code and switch
> to a Framework.

So you could use mod_rewrite to switch to urls that look like
http://example.org/somepage?action=someaction, or even
http://example.org/somepage/someaction

Depends on how much re-coding you want to do, and how flexible
"Cliff's hack" needs to be to get the job done.

I use a url scheme that looks like
http://example.org/path/to/some/object.format?action=someaction
The default action is "view" so standard page views require no query string.

-- 
Chris Snyder
http://chxo.com/



More information about the talk mailing list