Content / help / biscuits-htaccess .. concise-view << previous next >>


This is a typical .htaccess file for MVC and particularly biscuits MVC. If the file exists as a path on the server, the file will be accessed. Otherwise, and normally, the controller will determine the class and method to use for loading page content.
You could say that this file, together with the index.php file in the public html root directory, are the first important components of biscuits MVC.
Typically the index.php can have a case statement to direct various domain names, hosted on the server, to different versions of biscuits. Even if all the various domain names on this hosting are on the same version of biscuits, the controller will load separate content configuration files. The content configuration is set in the /domains directory and can dress the pages differently or even contain different view files and application controllers. the main controller will first look for a class in the appBase defined for a domain in the /domains configuration php file. The view files are also contained within an application area linked to a domain name. This allows web masters to use one domain to develop and test on the same server. This test domain can even open the same database.

The .htaccess content

Cut and paste this and use as your sites .htaccess file in the public html root directory of the server.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [NC]

iBiscuits LOGO