1 # Apache configuration for COCANWIKI.
2 # $Id: cocanwiki.conf,v 1.25 2006/12/06 09:46:54 rich Exp $
4 # Uncomment the following lines if necessary. You will probably need
5 # to adjust the paths to reflect where cocanwiki is really installed.
7 # DocumentRoot /usr/share/cocanwiki/html
8 # CamlLoad /usr/share/cocanwiki/html/_bin/cocanwiki.cma
11 SetHandler ocaml-bytecode
12 CamlHandler Registry.handler
17 <Location /_bin/admin>
18 # The admin subdirectory contains sensitive scripts, and should
19 # be protected by ACLs and/or passwords. This is just an example:
21 Allow from 127.0.0.1 192.168.2.249
26 ExpiresDefault "now plus 24 hours"
31 ExpiresDefault "now plus 24 hours"
36 ExpiresDefault "now plus 24 hours"
41 ExpiresDefault "now plus 24 hours"
45 ErrorDocument 500 /_bin/crash.cmo
47 # Start of the rewrite rules.
51 # The favicon.ico and robots.txt files need special treatment.
52 RewriteRule ^/favicon.ico /favicon.ico [PT,L]
53 RewriteRule ^/robots.txt /robots.txt [PT,L]
56 RewriteRule ^/_admin$ /_bin/admin/admin.cmo [PT,L,QSA]
57 RewriteRule ^/_contact$ /_bin/contact.cmo [PT,L,QSA]
58 RewriteRule ^/_email_change$ /_bin/email_change.cmo [PT,L,QSA]
59 RewriteRule ^/_files$ /_bin/files.cmo [PT,L,QSA]
60 RewriteRule ^/_global.css$ /_bin/hoststyle.cmo [PT,L,QSA]
61 RewriteRule ^/_ie6_fixes.css$ /_bin/hoststyle.cmo?css=ie6_fixes [PT,L,QSA]
62 RewriteRule ^/_ie7_fixes.css$ /_bin/hoststyle.cmo?css=ie7_fixes [PT,L,QSA]
63 RewriteRule ^/_images$ /_bin/images.cmo [PT,L,QSA]
64 RewriteRule ^/_invite$ /_bin/invite_user_confirm_form.cmo [PT,L,QSA]
65 RewriteRule ^/_links$ /_bin/links.cmo [PT,L,QSA]
66 RewriteRule ^/_login$ /_bin/login_form.cmo [PT,L,QSA]
67 RewriteRule ^/_logout$ /_bin/logout.cmo [PT,L,QSA]
68 RewriteRule ^/_mailing_list.csv$ /_bin/mailing_list_view.cmo?csv=1 [PT,L]
69 RewriteRule ^/_ml_confirm$ /_bin/mailing_list_confirm.cmo [PT,L,QSA]
70 RewriteRule ^/_ml_unsub$ /_bin/mailing_list_unsubscribe.cmo [PT,L,QSA]
71 RewriteRule ^/_pe_confirm$ /_bin/page_email_confirm.cmo [PT,L,QSA]
72 RewriteRule ^/_pe_unsub$ /_bin/page_email_unsubscribe.cmo [PT,L,QSA]
73 RewriteRule ^/_recent$ /_bin/recent.cmo [PT,L,QSA]
74 RewriteRule ^/_recent.rss$ /_bin/recent_rss.cmo [PT,L,QSA]
75 RewriteRule ^/_search$ /_bin/search.cmo [PT,L,QSA]
76 RewriteRule ^/_sitemap$ /_bin/sitemap.cmo [PT,L,QSA]
77 RewriteRule ^/_sitemap.rss$ /_bin/sitemap_rss.cmo [PT,L,QSA]
78 RewriteRule ^/sitemap.xml$ /_bin/sitemap_xml.cmo [PT,L,QSA]
79 RewriteRule ^/_userprefs$ /_bin/user_prefs_form.cmo [PT,L,QSA]
80 RewriteRule ^/_users$ /_bin/users.cmo [PT,L,QSA]
82 # Image and file downloads.
83 RewriteRule ^/_file/(.*)$ /_bin/file.cmo?name=$1 [PT,L,QSA]
84 RewriteRule ^/_image/(.*)$ /_bin/image.cmo?image=$1 [PT,L,QSA]
86 # Old _dist subdirectory no longer exists.
87 RewriteRule ^/_dist/ / [R]
89 # Page-related scripts.
90 RewriteRule ^/([^_].*)/diff$ /_bin/diff.cmo?page=$1 [PT,L,QSA]
91 RewriteRule ^/([^_].*)/edit$ /_bin/edit.cmo?page=$1 [PT,L,QSA]
92 RewriteRule ^/([^_].*)/editcss$ /_bin/edit_page_css_form.cmo?page=$1 [PT,L,QSA]
93 RewriteRule ^/([^_].*)/history$ /_bin/history.cmo?page=$1 [PT,L,QSA]
94 RewriteRule ^/([^_].*)/history.rss$ /_bin/history_rss.cmo?page=$1 [PT,L,QSA]
95 RewriteRule ^/([^_].*)/index.rss$ /_bin/page_rss.cmo?page=$1 [PT,L,QSA]
96 RewriteRule ^/([^_].*)/links$ /_bin/links.cmo?page=$1 [PT,L,QSA]
97 RewriteRule ^/([^_].*)/rename$ /_bin/rename_page_form.cmo?page=$1 [PT,L,QSA]
98 RewriteRule ^/([^_].*)/source$ /_bin/source.cmo?page=$1 [PT,L,QSA]
99 RewriteRule ^/([^_].*)/stats$ /_bin/stats.cmo?page=$1 [PT,L,QSA]
100 RewriteRule ^/([^_].*)/styles.css$ /_bin/pagestyle.cmo?page=$1 [PT,L,QSA]
103 RewriteRule ^/$ /_bin/page.cmo?page=index [PT,L,QSA]
104 #non-greedy matches don't parse - why?
105 #RewriteRule ^/([^_].*?)/?$ /_bin/page.cmo?page=$1 [PT,L,QSA]
106 RewriteRule ^/([^_].*[^/])/?$ /_bin/page.cmo?page=$1 [PT,L,QSA]