From 727c184904902ca235ace5098ef193974115f550 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 4 Apr 2007 01:26:42 +0000 Subject: RewriteRule example --- ...th_redirects_from_foo.html_to_corresponding_index.html.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn b/doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn index 14f2350a4..27dcbd9d3 100644 --- a/doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn +++ b/doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn @@ -2,3 +2,13 @@ Now that ikiwiki supports using page/index.html rather than page.html, how about > I was thinking of using an apache RewriteRule for this, haven't written > one yet though. --[[Joey]] + +> Here's a RewriteRule that I'm using for , which +> has an wiki at the top level that's using index.htmls, and some +> other stuff that shouldn't be rewritten. + + RewriteCond $1 !^/~ + RewriteCond $1 !^/doc/ + RewriteCond $1 !^/cgi-bin/ + RewriteRule (.+).html $1/ [R] + #RewriteRule /~family/(.+).html /~family/$1/ [R] -- cgit v1.2.3