Nice URLs for dokuwiki

This commit is contained in:
Thomas Basler 2020-09-12 19:01:28 +02:00
parent 78dc0938bf
commit c4101bc585

View File

@ -51,6 +51,10 @@ server {
rewrite ^/owncloud(/.*)$ https://oc.binary-kitchen.de$1; rewrite ^/owncloud(/.*)$ https://oc.binary-kitchen.de$1;
} }
location /wiki {
try_files $uri $uri/ @dokuwiki;
}
location ~ /wiki/(data/|conf/|bin/|inc/|install.php) { location ~ /wiki/(data/|conf/|bin/|inc/|install.php) {
deny all; deny all;
} }
@ -63,6 +67,14 @@ server {
autoindex on; autoindex on;
} }
location @dokuwiki {
rewrite ^/wiki/_media/(.*) /wiki/lib/exe/fetch.php?media=$1 last;
rewrite ^/wiki/_detail/(.*) /wiki/lib/exe/detail.php?media=$1 last;
rewrite ^/wiki/_export/([^/]+)/(.*) /wiki/doku.php?do=export_$1&id=$2 last;
rewrite ^/wiki/tag/(.*) /wiki/doku.php?id=tag:$1&do=showtag&tag=tag:$1 last;
rewrite ^/wiki/(.*) /wiki/doku.php?id=$1&$args last;
}
location ~ \.php(?:$|/) { location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params; include fastcgi_params;