aboutsummaryrefslogtreecommitdiff
path: root/doc/tips/redirections_for_usedirs.mdwn
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-14 20:18:11 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-14 20:18:11 +0000
commit868ce06b36377da65f79d888b1cb042adfb11161 (patch)
tree4a9a4799bd2c91213a6cecf53dbb4548b8f56438 /doc/tips/redirections_for_usedirs.mdwn
parent3d23d87b2124041187dd7242f6be4d56a32d94c6 (diff)
downloadikiwiki-868ce06b36377da65f79d888b1cb042adfb11161.tar
ikiwiki-868ce06b36377da65f79d888b1cb042adfb11161.tar.gz
turn tips page into a feed
Diffstat (limited to 'doc/tips/redirections_for_usedirs.mdwn')
-rw-r--r--doc/tips/redirections_for_usedirs.mdwn22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/tips/redirections_for_usedirs.mdwn b/doc/tips/redirections_for_usedirs.mdwn
new file mode 100644
index 000000000..b6e85aac8
--- /dev/null
+++ b/doc/tips/redirections_for_usedirs.mdwn
@@ -0,0 +1,22 @@
+Want to turn on the `usedirs` setting on an existing wiki without breaking
+all the links into it? Here's a way to do it for Apache, using the
+RewriteEngine. This example is for a wiki at the top of a web site, but can
+be adapted to other situations.
+
+ # pages
+ RewriteCond $1 !^/~ # these pages
+ RewriteCond $1 !^/doc/ # are not part of
+ RewriteCond $1 !^/ajaxterm # the wiki, so
+ RewriteCond $1 !^/cgi-bin/ # don't rewrite them
+ RewriteCond $1 !.*/index$
+ RewriteRule (.+).html $1/ [R]
+
+ # rss feeds
+ RewriteCond $1 !^/~
+ RewriteCond $1 !.*/index$
+ RewriteRule (.+).rss $1/index.rss
+
+ # atom feeds
+ RewriteCond $1 !^/~
+ RewriteCond $1 !.*/index$
+ RewriteRule (.+).atom $1/index.atom