joomla1.5 nginx url重写规则

有运维或运维开发方面的需求,可以联系博主QQ 452336092或Email:admin#centos.bz(收费)

  1. if ( !-e $request_filename ) {
  2. rewrite (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ /index.php last;
  3. break;
  4. }
  5. #bellow are anti-attack joomla setting
  6.  
  7. if ( $args ~ "mosConfig_[a-zA-Z_]{1,21}(=|\%3d)" ) {
  8. set $args "";
  9. rewrite ^.*$ http://$host/index.php last;
  10. return 403;
  11. }
  12. if ( $args ~ "base64_encode.*\(.*\)" ) {
  13. set $args "";
  14. rewrite ^.*$ http://$host/index.php last;
  15. return 403;
  16. }
  17. if ( $args ~ "(\<|%3C).*script.*(\>|%3E)" ) {
  18. set $args "";
  19. rewrite ^.*$ http://$host/index.php last;
  20. return 403;
  21. }
  22. if ( $args ~ "GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ) {
  23. set $args "";
  24. rewrite ^.*$ http://$host/index.php last;
  25. return 403;
  26. }
  27. if ( $args ~ "_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ) {
  28. set $args "";
  29. rewrite ^.*$ http://$host/index.php last;
  30. return 403;
  31. }

转载请保留原文链接:Linux运维日志 » joomla1.5 nginx url重写规则

打赏

如果此文对你有所帮助,请随意打赏鼓励作者^_^

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址