Force Type with .htaccess
The .htaccess can be used for many apache http server functions. Today we're going to take a quick look at 'force type'. Force Type allows you present a webpage in another format than default. For example, if we have index.html but would like apache to process it as php, we could add
<Files article>
ForceType application/x-httpd-php
</Files>
to the .htaccess file. This allows you to create a site which looks static (.htm or .html) but process the data and content as php.
Once place I use this is with the article page, if you click in to this article it would look something like this http://ryanpartington.com/article/freewebdesign/ - article is actually a php page, and I pass the variable freewebdesign/ to a MySQL query.
Thanks
Ryan Partington


