X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6e16b3ab864e2d9ff2e6d3a00bf10f8dc7ca51a8..5d602a840763a1d552730ddee55361104e31c71b:/doc/tips/switching_to_usedirs/discussion.mdwn?ds=sidebyside diff --git a/doc/tips/switching_to_usedirs/discussion.mdwn b/doc/tips/switching_to_usedirs/discussion.mdwn index e8c153ae4..fe937c5dd 100644 --- a/doc/tips/switching_to_usedirs/discussion.mdwn +++ b/doc/tips/switching_to_usedirs/discussion.mdwn @@ -11,4 +11,28 @@ OK, now that I've written this out, I see a solution. The include for the synta I'll leave this ramble here in case anyone has anything to say about it. Thank you for listening :-) --- KarlMW \ No newline at end of file +-- [[KarlMW]] + +------ +This may serve only to highlight my naivete, but what are the advantages of the usedirs approach? I'm not passionately against the option, and I'm confident that there must be benefits for it to have become the default in ikiwiki - I just don't understand why. + +It seems to me that the only advantage is slightly tidier URLs, but with the disadvantage that source files change dir level and relative links need to change too. + +-- [[KarlMW]] + +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]]