]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn
web commit by JoshTriplett: Long-term, ikiwiki needs some general permission mechanis...
[ikiwiki.git] / doc / todo / Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn
index 6a2ef05e54a3d33bdb626f6ae1f56a8111fd89ad..56b0d5890a576e92631fa0370a0b11c815e5d6d7 100644 (file)
@@ -9,8 +9,14 @@ Now that ikiwiki supports using page/index.html rather than page.html, how about
 
        RewriteCond $1 !^/~
        RewriteCond $1 !^/doc/
+       RewriteCond $1 !^/ajaxterm
        RewriteCond $1 !^/cgi-bin/
-       RewriteCond $1 !^/index
+       RewriteCond $1 !.*/index$
        RewriteRule (.+).html $1/ [R]
 
-       #RewriteRule /~family/(.+).html /~family/$1/ [R]
+
+>> Nice solution.  I think this would work for a newly-converted wiki as well,
+>> using a condition to limit rewrites to that wiki's directory, and the
+>> rewrite rule you propose.  Thus, autogenerating seems unnecessary; we
+>> should just have a documented, known-working RewriteCond and RewriteRule
+>> for wikis that want to turn on the `usedirs` option.  --[[JoshTriplett]]