Apache uses a physical mapping technique to map URLs to a physical files. The easiest way to register a FrontController with apache is to move physical file into the ~DocumentRoot directory. Assuming a DocumentRoot of /home/user/public_html, apache will map http://www.mydomain.com/index.php?category=fish to the file /home/user/public_html/index.php.

To make the previous URL look friendlier to both search engines and to surfers, you can take advantage of the fact that apache stops parsing an url as soon as it has found a file to handle it. Thus apache will also map the following url to the same file:

http://www.mydomain.com/index.php/fish/

The /fish/ portion of this url is not used for locating the physical file because the file has already been found before that segment of the url is processed.

If you are unhappy with the index.php in your url, you can take advantage of mod_mimes, ForceType directive. First, rename index.php to category with no extension. Then add the following to your .htaccess or apache config file:

<Files category>
ForceType application/x-httpd-php
</Files>


Because it has no extension, this is required to force apache to use php interpret the category file. This would then make the url into:

http://www.mydomain.com/category/fish/