标题:
[BUG反馈]
nginx,N+A组合的WEB引擎中,rewrite功能用不了么?
[打印本页]
作者:
hotmy
时间:
2017-5-23 17:37
标题:
nginx,N+A组合的WEB引擎中,rewrite功能用不了么?
如何设置呢?
作者:
hotmy
时间:
2017-5-27 16:29
方法:
1、增加rewrite规则文件
名称:joomla_nginx.conf
内容如下:
if ( $args ~ "mosConfig_[a-zA-Z_]{1,21}(=|\%3d)" ) {
set $args "";
rewrite ^.*$ http://$host/index.php last;
return 403;}
if ( $args ~ "base64_encode.*\(.*\)") {
set $args "";
rewrite ^.*$ http://$host/index.php last;
return 403;}
if ( $args ~ "(\|%3E)") {
set $args "";
rewrite ^.*$ http://$host/index.php last;
return 403;}
if ( $args ~ "GLOBALS(=|\[|\%[0-9A-Z]{0,2})") {
set $args "";
rewrite ^.*$ http://$host/index.php last;
return 403;}
if ( $args ~ "_REQUEST(=|\[|\%[0-9A-Z]{0,2})") {
set $args "";
rewrite ^.*$ http://$host/index.php last;
return 403;}
if (!-e $request_filename) {
rewrite (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ /index.php last;
break;
}
复制代码
2、在创建站点或编辑站点的“支持rewrite”选项下选择文件 joomla_nginx.conf
保存即可。
以上内容存档共勉
欢迎光临 WDlinux官方论坛 (http://www.wdlinux.cn/bbs/)
Powered by Discuz! 7.2