The Dispatcher

The Dispatcher handles URL redirections.
For instance, instead of using multiple files in the root folder like product.php, order.php or category.php, PrestaShop only uses one file: index.php.

Starting with PrestaShop 1.5, front office URLs look like this:

Likewise, back office URLs look like this:

Additionally, the Dispatcher is built to support URL rewriting (or "Friendly URLs"). Therefore, PrestaShop URLs which look like this when URL-rewriting is off...

http://myprestashop.com/index.php?controller=category&id_category=3&id_lang=1
http://myprestashop.com/index.php?controller=product&id_product=1&id_lang=2

...will look like this when URL-rewriting is on:

http://myprestashop.com/en/3-music-ipods
http://myprestashop.com/fr/1-ipod-nano.html

There are several advantages to this system:

The Dispatcher makes use of three abstract classes: Controller, FrontController and AdminController (the last two inheriting from the first one).

New routes can be created by overriding the loadRoutes() method.
The store's administrator can change a controller's URL using the "SEO & URLs" page in the back office's "Preferences" menu.