0

Does anyone know how to enable SSI for URIs such as http//domain.com/page ?

(It is straightforward to enable SSI for URIs that have extensions, such as http//domain.com/page.html or http//domain.com/page.shtml -- instructions are found on https://httpd.apache.org/docs/current/howto/ssi.html .)

mod_rewrite does not work. Using a symbolic link from page to page.html does not work either.

Thanks!

2 Answers2

0

Apache has to be told how to respond to URLs that don't have an extension. The way to do that is with DirectoryIndex and DirectorySlash:

https://httpd.apache.org/docs/current/mod/mod_dir.html

Once it knows how to map those requests to a file, it will use the extension of the file to determine if SSI should be enabled.

Jonah Benton
  • 1,252
  • 7
  • 13
-1
<LocationMatch "page">
  SetOutputFilter INCLUDES
</LocationMatch>
  • This is fine too, just a couple of minor considerations- if one is already publishing files to disk, which sounds like is what was happening, use of dirindex ensures a consistent physical instantiation of the taxonomy. Second, locationmatch matches everything under the path, and if there are some nonssi files like css or js, the results may be surprising. Dirindex is more targeted. Otherwise locationmatch is a good solution. – Jonah Benton Aug 26 '16 at 11:05