/_sitemap.rss for COCANWIKI.
[cocanwiki.git] / conf / cocanwiki.conf
1 # Apache configuration for COCANWIKI.
2 # $Id: cocanwiki.conf,v 1.24 2006/09/22 10:50:37 rich Exp $
3
4 # Uncomment the following lines if necessary.  You will probably need
5 # to adjust the paths to reflect where cocanwiki is really installed.
6
7 # DocumentRoot /usr/share/cocanwiki/html
8 # CamlLoad /usr/share/cocanwiki/html/_bin/cocanwiki.cma
9
10 <Location /_bin>
11   SetHandler ocaml-bytecode
12   CamlHandler Registry.handler
13   Options ExecCGI
14   Allow from all
15 </Location>
16
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:
20   Deny from all
21   Allow from 127.0.0.1 192.168.2.249
22 </Location>
23
24 <Location /_graphics>
25   ExpiresActive On
26   ExpiresDefault "now plus 24 hours"
27 </Location>
28
29 <Location /_js>
30   ExpiresActive On
31   ExpiresDefault "now plus 24 hours"
32 </Location>
33
34 <Location /_css>
35   ExpiresActive On
36   ExpiresDefault "now plus 24 hours"
37 </Location>
38
39 <Location /_static>
40   ExpiresActive On
41   ExpiresDefault "now plus 24 hours"
42 </Location>
43
44 # Error documents.
45 ErrorDocument 500 /_bin/crash.cmo
46
47 # Start of the rewrite rules.
48
49 RewriteEngine on
50
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]
54
55 # Global scripts.
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 ^/_images$ /_bin/images.cmo [PT,L,QSA]
62 RewriteRule ^/_invite$ /_bin/invite_user_confirm_form.cmo [PT,L,QSA]
63 RewriteRule ^/_links$ /_bin/links.cmo [PT,L,QSA]
64 RewriteRule ^/_login$ /_bin/login_form.cmo [PT,L,QSA]
65 RewriteRule ^/_logout$ /_bin/logout.cmo [PT,L,QSA]
66 RewriteRule ^/_mailing_list.csv$ /_bin/mailing_list_view.cmo?csv=1 [PT,L]
67 RewriteRule ^/_ml_confirm$ /_bin/mailing_list_confirm.cmo [PT,L,QSA]
68 RewriteRule ^/_ml_unsub$ /_bin/mailing_list_unsubscribe.cmo [PT,L,QSA]
69 RewriteRule ^/_pe_confirm$ /_bin/page_email_confirm.cmo [PT,L,QSA]
70 RewriteRule ^/_pe_unsub$ /_bin/page_email_unsubscribe.cmo [PT,L,QSA]
71 RewriteRule ^/_recent$ /_bin/recent.cmo [PT,L,QSA]
72 RewriteRule ^/_recent.rss$ /_bin/recent_rss.cmo [PT,L,QSA]
73 RewriteRule ^/_search$ /_bin/search.cmo [PT,L,QSA]
74 RewriteRule ^/_sitemap$ /_bin/sitemap.cmo [PT,L,QSA]
75 RewriteRule ^/_sitemap.rss$ /_bin/sitemap_rss.cmo [PT,L,QSA]
76 RewriteRule ^/sitemap.xml$ /_bin/sitemap_xml.cmo [PT,L,QSA]
77 RewriteRule ^/_userprefs$ /_bin/user_prefs_form.cmo [PT,L,QSA]
78 RewriteRule ^/_users$ /_bin/users.cmo [PT,L,QSA]
79
80 # Image and file downloads.
81 RewriteRule ^/_file/(.*)$ /_bin/file.cmo?name=$1 [PT,L,QSA]
82 RewriteRule ^/_image/(.*)$ /_bin/image.cmo?image=$1 [PT,L,QSA]
83
84 # Old _dist subdirectory no longer exists.
85 RewriteRule ^/_dist/ / [R]
86
87 # Page-related scripts.
88 RewriteRule ^/([^_].*)/diff$ /_bin/diff.cmo?page=$1 [PT,L,QSA]
89 RewriteRule ^/([^_].*)/edit$ /_bin/edit.cmo?page=$1 [PT,L,QSA]
90 RewriteRule ^/([^_].*)/editcss$ /_bin/edit_page_css_form.cmo?page=$1 [PT,L,QSA]
91 RewriteRule ^/([^_].*)/history$ /_bin/history.cmo?page=$1 [PT,L,QSA]
92 RewriteRule ^/([^_].*)/history.rss$ /_bin/history_rss.cmo?page=$1 [PT,L,QSA]
93 RewriteRule ^/([^_].*)/index.rss$ /_bin/page_rss.cmo?page=$1 [PT,L,QSA]
94 RewriteRule ^/([^_].*)/links$ /_bin/links.cmo?page=$1 [PT,L,QSA]
95 RewriteRule ^/([^_].*)/rename$ /_bin/rename_page_form.cmo?page=$1 [PT,L,QSA]
96 RewriteRule ^/([^_].*)/source$ /_bin/source.cmo?page=$1 [PT,L,QSA]
97 RewriteRule ^/([^_].*)/stats$ /_bin/stats.cmo?page=$1 [PT,L,QSA]
98 RewriteRule ^/([^_].*)/styles.css$ /_bin/pagestyle.cmo?page=$1 [PT,L,QSA]
99
100 # Serve pages.
101 RewriteRule ^/$ /_bin/page.cmo?page=index [PT,L,QSA]
102 #non-greedy matches don't parse - why?
103 #RewriteRule ^/([^_].*?)/?$ /_bin/page.cmo?page=$1 [PT,L,QSA]
104 RewriteRule ^/([^_].*[^/])/?$ /_bin/page.cmo?page=$1 [PT,L,QSA]