diff options
author | http://christian.amsuess.com/chrysn <http://christian.amsuess.com/chrysn@web> | 2015-02-10 10:31:56 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2015-02-10 10:31:56 -0400 |
commit | 10ee7ee614fd1e3ec44bde64be144ee8c6a6c24b (patch) | |
tree | 18e488952504a5852348e7b038fdc09437da0ab8 | |
parent | 7642becef47d3eafb73b595d100b45fae3561293 (diff) | |
download | ikiwiki-10ee7ee614fd1e3ec44bde64be144ee8c6a6c24b.tar ikiwiki-10ee7ee614fd1e3ec44bde64be144ee8c6a6c24b.tar.gz |
apache config sniplet for usedirs migration
-rw-r--r-- | doc/tips/switching_to_usedirs/discussion.mdwn | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/tips/switching_to_usedirs/discussion.mdwn b/doc/tips/switching_to_usedirs/discussion.mdwn index 79ada00a1..fe937c5dd 100644 --- a/doc/tips/switching_to_usedirs/discussion.mdwn +++ b/doc/tips/switching_to_usedirs/discussion.mdwn @@ -22,3 +22,17 @@ It seems to me that the only advantage is slightly tidier URLs, but with the dis The cleaner urls seem worth it to me. The `urlto()` function makes it easy for ikiwiki code to deal with the path changes. --[[Joey]] + +-------- + +when migrating to usedirs, the following apache config sniplet might be useful (use inside the Directory section that manages your wiki): + + RewriteEngine on + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.+)\.html$ /my_base_path/$1/ [R] + +that sniplet causes redirects from any non-existing .html file to the respective usedirs directory. (when serving from the host root url, drop the my_base_path part, otherwise adapt it to your needs). + +i recommend using this or a similar mechanism to keep your old urls reachable. + +--[[chrysn]] |