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

发表时间:2013-04-08 13:05 | 分类:其他知识 | 浏览:438 次

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;

本文标签:,

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

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

icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif 

一键脚本 SSH攻击 IP查询 博客历程 留言本 文章归档 网站地图 谷歌地图
托管于阿里云&七牛云. 已加入博客联盟. 浙ICP备13025236号.
Copyright © 2010-2016 虫虫开源 All Rights Reserved.