下面是个人的Nginx vhost配置文件,添加到nginx重写规则中,供参考:
server {
listen 80;
server_name 111com.net www.111com.net ;
access_log /data/wwwlogs/111com.net _nginx.log combined;
index index.html index.php duku.php;
include /usr/local/nginx/conf/none.conf;
root /data/wwwroot/111com.net ;
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(?!lib/)(.*) /doku.php?id=$1&$args last;
}
location ~ [^/].php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*.(js|css)?$ {
expires 7d;
access_log off;
}
}
核心规则如下,需要加入server段内:
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(?!lib/)(.*) /doku.php?id=$1&$args last;
}
location ~ .*.(js|css)?$ {
expires 7d;
access_log off;
}
下面一步,将conf/local.php中加入一行:
1
$conf['userewrite'] = 2;
最后修改dokuwiki后台设置,后台 -> 管理 -> 配置管理器 -> 高级设置 -> 使用更整洁的 URL,选中.htaccess保存后查看效果。
美国火车模拟器中文版
美国火车模拟器是玩法非常丰富火车模拟驾驶玩家可以在这里解锁各
饥荒海难单机手游版
饥荒海难单机版,估计是无人不知,无人不晓的游戏了,在这里你将
饥荒海难华为手机版
喜欢荒岛求生系列的小伙伴,怎么能够不来玩一玩饥荒海难华为版这
我的世界战斗工艺3D模组手机版(GameInstaller)
我的世界战斗工艺3d模组是一个充满热血战争元素的像素冒险类游
樱花校园模拟器解锁版
樱花校园模拟器完整版,一个玩过的玩家都说好的手机游戏。这里采