Here's a quick how-to: To serve html files without file extensions, use a .htaccess file in the root directory that looks like this:
DirectoryIndex index index.html index.htm index.php
<FilesMatch "^[^.]*$">
SetHandler server-parsed
ForceType text/html
</FilesMatch>
Because we cannot make changes to the Apache server configuration file, .htaccess is the way to go. For some reason, I had trouble getting this to work the first time - I think my browser cache was interfering - but after I deleted the .htaccess file, and created a new one, it worked.
Why would you want to do this? Manila has some rendering bugs that cause some urls to be incorrectly written if you are adding a file extension at render time. Also, using files without extensions adds the possibility of developing in a different environment without having to change the file names. Plus, it's just cool.
Posted by Scott Girard on 4/20/06; 3:53:14 PM
from the News dept.
|