|
.htaccessThis file is located at the root directory, along with index.php. It is worth mentioning that .htaccess is parsed and executed by the web server and not by zoglair. It provides directory-level configuration, as opposed to the server-wide one. It can contain most of the commands (or directives) found in the server's main configuration file (httpd.conf), although it is commonly used for URL rewriting, thanks to the mod_rewrite module. Depending on your OS, .htaccess may be hidden, due to its name starting with a dot. If you do not see this file, make sure that you have setup your file manager or FTP client to show hidden files. The .htaccess included in zoglair package contains a few rewriting rules, all of them optional except the last one:
Keeping in mind that a hash symbol (#) marks a line as a comment, here is an explanation of the included directives... To www or not to www?To rephrase the above question, is The Serving static contentA web page, usually, is a mixture of dynamic and static content. Dynamic content is the one which is pulled from a database and/or generated on the fly. Static content is the one which is pulled from the filesystem, such as images, scripts and styles. The web server knows how to serve a request for a static content: it just reads the file pointed to by the url and sends it back to the user agent. It cannot do that for dynamic content, and that is the reason of why we are using a CMS in the first place! Zoglair, however, not only knows how to send both content types, but it is specially crafted to deal with static content in the most efficient way. This is, in fact, one of its features, as most other CMSs are not tuned up for this task. So, a question arises: which one should be used for serving static content - zoglair or the web server? The former gives you flexibility and access control. The latter gives you a slightly better performance. In any case, this question is best answered by your server administrator (or web host). Zoglair relies on apache_request_headers() to look for and parse the |