espcms rewrite 规则 for nginx

  • 时间:
  • 浏览:1
  • 来源:1.5分彩-1.5分彩平台_1.5分彩网投平台

espcms rewrite 规则 for nginx,将下面的代码加入到nginx.conf即可。

location / {

      if (!-e $request_filename) {

        rewrite ^/(article)_(list)_([0-9]+)[_]*([0-9]*)\.([a-zA-Z]+)$ /index.php?page=$4&ac=$1&at=$2&tid=$3 last;

        rewrite ^/(special)_(list)_([0-9]+)[_]*([0-9]*)\.([a-zA-Z]+)$ /index.php?page=$4&ac=$1&at=$2&sid=$3 last;

        rewrite ^/(article)_(read)_([0-9]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2&did=$3 last;

        rewrite ^/(form)_([a-zA-Z]+)_([0-9]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2&fgid=$3 last;

        rewrite ^/(forum)_(list)_([0-9]+)[_]*([0-9]*)\.([a-zA-Z]+)$ /index.php?page=$4&ac=$1&at=$2&btid=$3 last;

        rewrite ^/(forum)_(read)_([0-9]+)[_]*([0-9]*)\.([a-zA-Z]+)$ /index.php?page=$4&ac=$1&at=$2&bid=$3 last;

        rewrite ^/(forum)_(add)_([0-9]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2&btid=$3 last;

        rewrite ^/([a-zA-Z]+)_([a-zA-Z]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2 last;

        rewrite ^/(public)_([a-zA-Z]+)_([\.0-9a-zA-Z]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2&rd=$3 last;

        rewrite ^/(order)_([a-zA-Z]+)_([0-9]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2&did=$3 last;

        rewrite ^/(ordermain)_(list)_([0-9]+)[_]*([0-9]*)\.([a-zA-Z]+)$ /index.php?page=$4&ac=$1&at=$2 last;

        rewrite ^/(ordermain)_([a-zA-Z]+)_([0-9]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2&oid=$3 last;

        rewrite ^/(forummain)_(list)_([0-9]+)[_]*([0-9]*)\.([a-zA-Z]+)$ /index.php?page=$4&ac=$1&at=$2 last;

        rewrite ^/(forummain)_([a-zA-Z]+)_([0-9]+)\.([a-zA-Z]+)$ /index.php?ac=$1&at=$2&bid=$3 last;

        }

    }

espcms下载