cnq 发表于 2016-12-29 06:30:44

Joomla在windows7+Nginx下的伪静态规则/安装好joomla后必须配置伪静态规则添加菜单才能显示正常

下载Joomla_3.3.3-Stable-Full_Package.zip后

安装好joomla后必须配置伪静态规则添加菜单才能显示正常   


Joomla在windows7+Nginx下的伪静态规则




if ( $args ~ "mosConfig_{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,2})") {
set $args "";
rewrite ^.*$ http://$host/index.php last;
return 403;}

if ( $args ~ "_REQUEST(=|\[|\%{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;
}

在部分虚拟主机上面可能需要下面的格式的规则

if ( $args ~ "mosConfig_{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,2})") {set $args "";rewrite ^.*$ http://$host/index.php last;return 403;}
if ( $args ~ "_REQUEST(=|\[|\%{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; }
页: [1]
查看完整版本: Joomla在windows7+Nginx下的伪静态规则/安装好joomla后必须配置伪静态规则添加菜单才能显示正常