全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
12
返回列表 发新帖
楼主: winok

[nginx] 有人用joomla吗??怎么写rewrite规则

[复制链接]
 楼主| 发表于 2010-8-19 11:01:14 | 显示全部楼层
谁帮我看看

    location / {
      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 ~ “(\<|%3C).*script.*(\>|%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;}
    }

这个可以吗??域名是taiidan.com/tae

[ 本帖最后由 winok 于 2010-8-19 11:08 编辑 ]
 楼主| 发表于 2010-8-19 11:09:13 | 显示全部楼层
放在tae文件夹的,但我用这个rewrite规则还是不行
 楼主| 发表于 2010-8-19 11:10:59 | 显示全部楼层
已经在nginx.conf加入了include
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-16 19:11 , Processed in 0.081273 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表