Reply... cannot think of a great solution.
[ikiwiki.git] / doc / bugs / po:__apache_config_serves_index_directory_for_index.mdwn
1 Similarly to [[po:_apache_config_serves_index.rss_for_index]],
2 the [[plugins/po]] apache config has another bug. 
3
4 The use of "DirectoryIndex index", when combined with multiviews, is intended
5 to serve up a localized version of the index.??.html file.
6
7 But, if the site's toplevel index page has a discussion page, that
8 is "/index/discussion/index.html". Or, if the img plugin is used to scale
9 an image on the index page, that will be "/index/foo.jpg". In either case,
10 the "index" directory exists, and so apache happily displays that
11 directory, rather than the site's index page!
12
13 --[[Joey]]
14
15 > Ack, we do have a problem. Seems like ikiwiki's use of `index/` as
16 > the directory for homepage's sub-pages and attachments makes it
17 > conflict deeply with Apache's `MultiViews`: as the [MultiViews
18 > documentation](http://httpd.apache.org/docs/2.2/mod/mod_negotiation.html#multiviews)
19 > says, `index.*` are considered as possible matches only if the
20 > `index/` directory *does not exist*. Neither type maps nor
21 > `mod_mime` config parameters seem to allow overriding this behavior.
22 > Worse even, I guess any page called `index` would have the same
23 > issues, not only the wiki homepage.
24
25 > I can think of two workarounds, both kinda stink:
26 >
27 > 1. Have the homepage's `targetpage` be something else than
28 >    `index.html`.
29 > 2. Have the directory for the homepage's sub-pages and attachments
30 >    be something else than `index`.
31 >
32 > I doubt either of those can be implemented without ugly special
33 > casing. Any other idea? --[[intrigeri]]