]> sipb.mit.edu Git - ikiwiki.git/commitdiff
RewriteRule example
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 4 Apr 2007 01:26:42 +0000 (01:26 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 4 Apr 2007 01:26:42 +0000 (01:26 +0000)
doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn

index 14f2350a4842fd55f9729061647afe0d3842f882..27dcbd9d32e43fea18e0fc37c9f48cfcc7ad604f 100644 (file)
@@ -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 <http://kitenet.net/>, 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]