From a946f9bf91600fb23697fc0d926b630e64082f87 Mon Sep 17 00:00:00 2001 From: joshtriplett Date: Fri, 6 Apr 2007 06:46:35 +0000 Subject: Move page again, with all of the changes this time. --- ..._from_foo.html_to_corresponding_index.html.mdwn | 22 ---------------------- ...Document_redirections_for_use_with_usedirs.mdwn | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn create mode 100644 doc/todo/Document_redirections_for_use_with_usedirs.mdwn (limited to 'doc/todo') 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 deleted file mode 100644 index 56b0d5890..000000000 --- a/doc/todo/Autogenerate_a_.htaccess_file_with_redirects_from_foo.html_to_corresponding_index.html.mdwn +++ /dev/null @@ -1,22 +0,0 @@ -Now that ikiwiki supports using page/index.html rather than page.html, how about some mechanism to automatically generate a .htaccess file with "Redirect permanent" lines for each such page? - -> 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 !^/ajaxterm - RewriteCond $1 !^/cgi-bin/ - RewriteCond $1 !.*/index$ - RewriteRule (.+).html $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]] diff --git a/doc/todo/Document_redirections_for_use_with_usedirs.mdwn b/doc/todo/Document_redirections_for_use_with_usedirs.mdwn new file mode 100644 index 000000000..56b0d5890 --- /dev/null +++ b/doc/todo/Document_redirections_for_use_with_usedirs.mdwn @@ -0,0 +1,22 @@ +Now that ikiwiki supports using page/index.html rather than page.html, how about some mechanism to automatically generate a .htaccess file with "Redirect permanent" lines for each such page? + +> 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 !^/ajaxterm + RewriteCond $1 !^/cgi-bin/ + RewriteCond $1 !.*/index$ + RewriteRule (.+).html $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]] -- cgit v1.2.3