LNMP环境下易思ESPCMS伪静态设置

发表时间:2013-04-08 13:05 | 分类:建站经验 | 浏览:2,440 次

espcms易思企业网站管理系统安装包内默认只提供.htaccess的配置,那么怎么让这个程序在lnmp下也支持伪静态呢?有一个网站可以把.htaccess转成nginx支持的格式,网址:http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ 。但是如果把转换后的格式直接拿来使用,章郎虫测试后发现还是错误的。所以这里把我修改后的配置文件和大家分享下。经过测试,绝对可用。

rewrite ^/([w/]*)(article)_(list)_([0-9]+)[_]*([0-9]*).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&tid=$4 last;
rewrite ^/([w/]*)(article)_(read)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&did=$4 last;
rewrite ^/([w/]*)(article)_(read)_([0-9]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&did=$4&page=$5 last;
rewrite ^/([w/]*)(special)_(list)_([0-9]+)[_]*([0-9]*).([a-zA-Z]+)$ $1/index.php?page=$5&ac=$2&at=$3&sid=$4 last;
rewrite ^/([w/]*)(search)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(messmain)_([a-zA-Z]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&did=$4 last;
rewrite ^/([w/]*)(messmain)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(form)_([a-zA-Z]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&fgid=$4 last;
rewrite ^/([w/]*)(order)_([a-zA-Z]+).([html]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(order)_([a-zA-Z]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&did=$4 last;
rewrite ^/([w/]*)(ordermain)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(ordermain)_(list)_([0-9]+)[_]*([0-9]*).([a-zA-Z]+)$ $1/index.php?page=$5&ac=$2&at=$3 last;
rewrite ^/([w/]*)(ordermain)_([a-zA-Z]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&oid=$4 last;
rewrite ^/([w/]*)(enquiry)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(enquiry)_([a-zA-Z]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&did=$4 last;
rewrite ^/([w/]*)(enquirymain)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(enquirymain)_(list)_([0-9]+)[_]*([0-9]*).([a-zA-Z]+)$ $1/index.php?page=$5&ac=$2&at=$3 last;
rewrite ^/([w/]*)(enquirymain)_([a-zA-Z]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&eid=$4 last;
rewrite ^/([w/]*)(forum)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(forum)_(list)_([0-9]+)[_]*([0-9]*).([a-zA-Z]+)$ $1/index.php?page=$5&ac=$2&at=$3&btid=$4 last;
rewrite ^/([w/]*)(forum)_(read)_([0-9]+)[_]*([0-9]*).([a-zA-Z]+)$ $1/index.php?page=$5&ac=$2&at=$3&bid=$4 last;
rewrite ^/([w/]*)(forum)_(add)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&btid=$4 last;
rewrite ^/([w/]*)(forummain)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(forummain)_(list)_([0-9]+)[_]*([0-9]*).([a-zA-Z]+)$ $1/index.php?page=$5&ac=$2&at=$3 last;
rewrite ^/([w/]*)(forummain)_([a-zA-Z]+)_([0-9]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&bid=$4 last;
rewrite ^/([w/]*)(public)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(public)_([a-zA-Z]+)_([.0-9a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3&rd=$4 last;
rewrite ^/([w/]*)(member)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;
rewrite ^/([w/]*)(membermain)_([a-zA-Z]+).([a-zA-Z]+)$ $1/index.php?ac=$2&at=$3 last;

本文标签:,

本文链接:https://www.sijitao.net/1306.html

欢迎您在本博客中留下评论,如需转载原创文章请注明出处,谢谢!

一键脚本 博客历程 留言联系 文章归档 网站地图 谷歌地图
Copyright © 2010-2024 章郎虫博客 All Rights Reserved.