Mereged updates from DokuWiki 38
[sudaraka-org:dokuwiki-mods.git] / .htaccess
1 ## Enable this to restrict editing to logged in users only
2
3 ## You should disable Indexes and MultiViews either here or in the
4 ## global config. Symlinks maybe needed for URL rewriting.
5 #Options -Indexes -MultiViews +FollowSymLinks
6
7 ## make sure nobody gets the htaccess, README, COPYING or VERSION files
8 <Files ~ "^([\._]ht|README$|VERSION$|COPYING$)">
9     Order allow,deny
10     Deny from all
11     Satisfy All
12 </Files>
13
14 ## Uncomment these rules if you want to have nice URLs using
15 ## $conf['userewrite'] = 1 - not needed for rewrite mode 2
16 RewriteEngine on
17 #
18 ## Not all installations will require the following line.  If you do,
19 ## change "/dokuwiki" to the path to your dokuwiki directory relative
20 ## to your document root.
21 #RewriteBase /dokuwiki
22 #
23 ## If you enable DokuWikis XML-RPC interface, you should consider to
24 ## restrict access to it over HTTPS only! Uncomment the following two
25 ## rules if your server setup allows HTTPS.
26 #RewriteCond %{HTTPS} !=on
27 #RewriteRule ^lib/exe/xmlrpc.php$      https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
28 ##
29
30 RewriteRule ^(category|tag|about-the-web-site|about-sudaraka-wijesinghe)/(.+)$                  /$2 [R=301,L]
31 RewriteRule ^(projects|project-gallery)/(.*)$                           /portfolio/$2 [R=301,L]
32 RewriteRule ^testimonials/(.*)                  /testimonials [R=302,L]
33 RewriteRule ^(.+)/page/(\d*)                    /$1 [R=301,L]
34 RewriteRule ^n2s/?$                                             /note-to-self [R=302,L]
35 RewriteRule ^n2s/(.*)$                                  /note-to-self/$1 [R=302,L]
36 RewriteRule ^(.*/)?snippets/(.*)$               /code-snippets/$2 [R=302,L]
37
38 RewriteRule ^_media/(.*)                                lib/exe/fetch.php?media=$1  [QSA,L]
39 RewriteRule ^_detail/(.*)                               lib/exe/detail.php?media=$1  [QSA,L]
40 RewriteRule ^_export/([^/]+)/(.*)               doku.php?do=export_$1&id=$2  [QSA,L]
41 RewriteRule ^sitemap\.xml                               doku.php?do=sitemap  [QSA,L]
42 RewriteRule (.+)\/$                                             /$1 [R=301,QSA,L]
43 RewriteRule ^$                                                  doku.php  [L]
44 RewriteCond %{REQUEST_FILENAME}                 !-f
45 RewriteCond %{REQUEST_FILENAME}                 !-d
46 RewriteRule (.*)                                                doku.php?id=$1  [QSA,L]
47 RewriteRule ^index.php$                                 doku.php