Revision [7773]
This is an old revision of HtaccessConfig made by JavaWoman on 2005-05-02 08:20:05.
Configuration via .htaccess
See also:
Documentation: HtaccessConfigInfo.For documentation of what the current .htaccess files do, see HtaccessConfigInfo; here, we're going to look at what the main .htaccess file might do for us - while also getting rid of the separate .htaccess files in subdirectories.
This page assumes we're working on Apache; other web servers may have similar mechanisms to exploit (even may use .htaccess files for that) but we're not dealing with that here.
Users working with a different webserver are welcome to add their own equivalent methods to this page or a separate one for their webserver!
this page is still a stub - more content to follow...
Efficiency
Default Apache behavior
Normally an Apache server has a directive in its server configuration (httpd.conf) that tells it which "index" file(s) to look for, in what order, when a user agent makes a request for a directory. Each of the file names specified will be tried in turn; if none of them is found, the directory content will be shown (if enabled) or a '403 Forbidden' response will be given if directory browsing is disabled (see Security options below).Getting to Wikka's main file: wikka.php
One of the file names normally in the index "search path" is index.html. Wikka runs operates completely through wikka.php though, so it comes with an index.html file in its installation directory which does nothing but redirect to wikka.php - which in its turn will redirect to the declared home page if not given a page parameter. That's rather ineffcient, because it means three browser requests just to get at the home page when requesting it's the installation directory.Making it more efficient
If .htaccess is not enabled on the server, we'll still need that index.html page redirecting to wikka.php - so we'll have to keep it. But if it is enabled we can save one browser roundtrip by telling Apache to go looking directly for wikka.php when a directory is requested - instead of going through its declared search path until it stumbles onto index.html which does exist in the directory. This will do it:DirectoryIndex wikka.php
Security options
Combating referrer spam
Preventing directories from being browsed
see also Directory requests below!Directory requests
Friendly URLs
Side effects to be aware of
Putting it all together
CategoryDevelopment