]> sipb.mit.edu Git - ikiwiki.git/blob - doc/tips/htaccess_file.mdwn
update
[ikiwiki.git] / doc / tips / htaccess_file.mdwn
1 If you try to include a `.htaccess` file in your wiki's source, in order to
2 configure the web server, you'll find that ikiwiki excludes it from
3 processing. In fact, ikiwiki excludes any file starting with a dot, as well
4 as a lot of other files, for good security reasons.
5
6 You can tell ikiwiki not to exclude the .htaccess file by adding this to
7 your setup file:
8
9         include => '^\.htaccess$',
10
11 Caution! Before you do that, please think for a minute about who can edit
12 your wiki. Are attachment uploads enabled? Can users commit changes
13 directly to the version control system? Do you trust everyone who can
14 make a change to not do Bad Things with the htaccess file? Do you trust
15 everyone who *might* be able to make a change in the future? Note that a
16 determined attacker who can write to the htaccess file can probably get a
17 shell on your web server.
18
19 If any of these questions have given you pause, I suggest you find a
20 different way to configure the web server. One way is to not put the
21 `.htaccess` file under ikiwiki's control, and just manually install it
22 in the destdir.
23
24 [Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html)
25 says
26 > In general, you should never use .htaccess files unless you don't have
27 > access to the main server configuration file.
28 This is good advice -- if you can edit apache's main configuration files,
29 then you should not use a htaccess file.
30 --[[Joey]]