开发者社区> 问答> 正文

这行url rewrite怎么写都出错:报错

需要将这段指定到根目录下的wiki目录去:

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 ^/(.*) /doku.php?id=$1 last;

 

增加到这个配置里去:

 

http {
server {
	listen       80;
	server_name  localhost;
	root   /Server/data/html;
	index  index.html index.htm index.php;

location / {
	autoindex on;
	if (!-e $request_filename) {
	rewrite (.*) /?index.php/$1;
	}
	}

#dokuwiki配置开始
location ~ /wiki/(data|conf|bin|inc)/ {
	deny all;
	}
#dokuwiki配置结束

location ~ \.php$ {
	fastcgi_pass   127.0.0.1:9000;
	fastcgi_index  index.php;
	fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
	include        fastcgi_params;
	}

location ~ /\.ht {
	deny  all;
	}
}
}
鼓捣了好几天了,还是没能解决...

展开
收起
kun坤 2020-06-09 22:24:25 605 0
1 条回答
写回答
取消 提交回答
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载