`

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

 
阅读更多
下载Joomla_3.3.3-Stable-Full_Package.zip后

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


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




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;
}

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

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; }
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics