summaryrefslogtreecommitdiff
path: root/doc/bugs/po:__apache_config_serves_index_directory_for_index.mdwn
blob: e8832c0b0923a79aead1fcf6150e8c75601e0236 (plain)

Similarly to [[po:_apache_config_serves_index.rss_for_index]], the [[plugins/po]] apache config has another bug.

The use of "DirectoryIndex index", when combined with multiviews, is intended to serve up a localized version of the index.??.html file.

But, if the site's toplevel index page has a discussion page, that is "/index/discussion/index.html". Or, if the img plugin is used to scale an image on the index page, that will be "/index/foo.jpg". In either case, the "index" directory exists, and so apache happily displays that directory, rather than the site's index page!

--[[Joey]]

Ack, we do have a problem. Seems like ikiwiki's use of index/ as the directory for homepage's sub-pages and attachments makes it conflict deeply with Apache's MultiViews: as the MultiViews documentation says, index.* are considered as possible matches only if the index/ directory does not exist. Neither type maps nor mod_mime config parameters seem to allow overriding this behavior. Worse even, I guess any page called index would have the same issues, not only the wiki homepage.

I can think of two workarounds, both kinda stink:

  1. Have the homepage's targetpage be something else than index.html.
  2. Have the directory for the homepage's sub-pages and attachments be something else than index.

I doubt either of those can be implemented without ugly special casing. Any other idea? --[[intrigeri]]