常用的框架伪静态(Apache转Nginx)
EmpireCMS: rewrite ^([^\.]*)/listinfo-(.+?)-(.+?)\.html$ $/e/action/ListInfo/index.php?classid=$&page=$ last;
rewrite ^([^\.]*)/showinfo-(.+?)-(.+?)-(.+?)\.html$ $/e/action/ShowInfo.php?classid=$&id=$&page=$ last;
rewrite ^([^\.]*)/infotype-(.+?)-(.+?)\.html$ $/e/action/InfoType/index.php?ttid=$&page=$ last;
rewrite ^([^\.]*)/tags-(.+?)-(.+?)\.html$ $/e/tags/index.php?tagname=$&page=$ last;
rewrite ^([^\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\.html$ $/e/pl/index\.php\?doaction=$&classid=$&id=$&page=$&myorder=$&tempid=$ last;
if (!-e $request_filename) {
return ;
} drba: location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$ last;
}
} dbshop: location /{
try_files $uri $uri/ /index.php$is_args$args;
} location ~ \.htaccess{
deny all;
} dedeCMS: location / {
rewrite "^/list-([0-9]+)\.html$" /plus/list.php?tid=$ last;
rewrite "^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$" /plus/list.php?tid=$&totalresult=$&PageNo=$ last;
rewrite "^/view-([0-9]+)-1\.html$" /plus/view.php?arcID=$ last;
rewrite "^/view-([0-9]+)-([0-9]+)\.html$" /plus/view.php?aid=$&pageno=$ last;
rewrite "^/tags.html$" /tags.php last;
rewrite "^/tag-([0-9]+)-([0-9]+)\.html$" /tags.php?/$/$/ last;
break;
} discuz: location / {
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$ last;
rewrite ^/forum-([-]+)-([-]+)\.html$ /forumdisplay.php?fid=$&page=$ last;
rewrite ^/thread-([-]+)-([-]+)-([-]+)\.html$ /viewthread.php?tid=$&extra=page%3D$&page=$ last;
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$=$ last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$ last;
} discuzx: rewrite ^([^\.]*)/topic-(.+)\.html$ $/portal.php?mod=topic&topic=$ last;
rewrite ^([^\.]*)/article-([-]+)-([-]+)\.html$ $/portal.php?mod=view&aid=$&page=$ last;
rewrite ^([^\.]*)/forum-(\w+)-([-]+)\.html$ $/forum.php?mod=forumdisplay&fid=$&page=$ last;
rewrite ^([^\.]*)/thread-([-]+)-([-]+)-([-]+)\.html$ $/forum.php?mod=viewthread&tid=$&extra=page%3D$&page=$ last;
rewrite ^([^\.]*)/group-([-]+)-([-]+)\.html$ $/forum.php?mod=group&fid=$&page=$ last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $/home.php?mod=space&$=$ last;
rewrite ^([^\.]*)/blog-([-]+)-([-]+)\.html$ $/home.php?mod=space&uid=$&do=blog&id=$ last;
rewrite ^([^\.]*)/(fid|tid)-([-]+)\.html$ $/index.php?action=$&value=$ last;
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $/plugin.php?id=$:$ last;
if (!-e $request_filename) {
return ;
} discuzx2: location /bbs/ {
rewrite ^([^\.]*)/topic-(.+)\.html$ $/portal.php?mod=topic&topic=$ last;
rewrite ^([^\.]*)/article-([-]+)-([-]+)\.html$ $/portal.php?mod=view&aid=$&page=$ last;
rewrite ^([^\.]*)/forum-(\w+)-([-]+)\.html$ $/forum.php?mod=forumdisplay&fid=$&page=$ last;
rewrite ^([^\.]*)/thread-([-]+)-([-]+)-([-]+)\.html$ $/forum.php?mod=viewthread&tid=$&extra=page%3D$&page=$ last;
rewrite ^([^\.]*)/group-([-]+)-([-]+)\.html$ $/forum.php?mod=group&fid=$&page=$ last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $/home.php?mod=space&$=$ last;
rewrite ^([^\.]*)/blog-([-]+)-([-]+)\.html$ $/home.php?mod=space&uid=$&do=blog&id=$ last;
rewrite ^([^\.]*)/(fid|tid)-([-]+)\.html$ $/index.php?action=$&value=$ last;
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $/plugin.php?id=$:$ last;
if (!-e $request_filename) {
return ;
}
} discuzx3: location / {
rewrite ^([^\.]*)/topic-(.+)\.html$ $/portal.php?mod=topic&topic=$ last;
rewrite ^([^\.]*)/article-([-]+)-([-]+)\.html$ $/portal.php?mod=view&aid=$&page=$ last;
rewrite ^([^\.]*)/forum-(\w+)-([-]+)\.html$ $/forum.php?mod=forumdisplay&fid=$&page=$ last;
rewrite ^([^\.]*)/thread-([-]+)-([-]+)-([-]+)\.html$ $/forum.php?mod=viewthread&tid=$&extra=page%3D$&page=$ last;
rewrite ^([^\.]*)/group-([-]+)-([-]+)\.html$ $/forum.php?mod=group&fid=$&page=$ last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $/home.php?mod=space&$=$ last;
rewrite ^([^\.]*)/blog-([-]+)-([-]+)\.html$ $/home.php?mod=space&uid=$&do=blog&id=$ last;
rewrite ^([^\.]*)/(fid|tid)-([-]+)\.html$ $/index.php?action=$&value=$ last;
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $/plugin.php?id=$:$ last;
if (!-e $request_filename) {
return ;
}
} drupal: if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$ last;
} ecshop: if (!-e $request_filename)
{
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$ last;
rewrite "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$ last;
rewrite "^/feed\.xml$" /feed.php last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$&brand=$&price_min=$&price_max=$&filter_attr=$&page=$&sort=$&order=$ last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$" /category.php?id=$&brand=$&price_min=$&price_max=$&filter_attr=$ last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$&brand=$&page=$&sort=$&order=$ last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$" /category.php?id=$&brand=$&page=$ last;
rewrite "^/category-([0-9]+)-b([0-9]+)(.*)\.html$" /category.php?id=$&brand=$ last;
rewrite "^/category-([0-9]+)(.*)\.html$" /category.php?id=$ last;
rewrite "^/goods-([0-9]+)(.*)\.html" /goods.php?id=$ last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /article_cat.php?id=$&page=$&sort=$&order=$ last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$" /article_cat.php?id=$&page=$ last;
rewrite "^/article_cat-([0-9]+)(.*)\.html$" /article_cat.php?id=$ last;
rewrite "^/article-([0-9]+)(.*)\.html$" /article.php?id=$ last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html" /brand.php?id=$&cat=$&page=$&sort=$&order=$ last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html" /brand.php?id=$&cat=$&page=$ last;
rewrite "^/brand-([0-9]+)-c([0-9]+)(.*)\.html" /brand.php?id=$&cat=$ last;
rewrite "^/brand-([0-9]+)(.*)\.html" /brand.php?id=$ last;
rewrite "^/tag-(.*)\.html" /search.php?keywords=$ last;
rewrite "^/snatch-([0-9]+)\.html$" /snatch.php?id=$ last;
rewrite "^/group_buy-([0-9]+)\.html$" /group_buy.php?act=view&id=$ last;
rewrite "^/auction-([0-9]+)\.html$" /auction.php?act=view&id=$ last;
rewrite "^/exchange-id([0-9]+)(.*)\.html$" /exchange.php?id=$&act=view last;
rewrite "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$&integral_min=$&integral_max=$&page=$&sort=$&order=$ last;
rewrite ^/exchange-([-]+)-([-]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$&page=$ last;
rewrite "^/exchange-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$ last;
} emlog: location / {
index index.php index.html;
if (!-e $request_filename)
{
rewrite ^/(.*)$ /index.php last;
}
} laravel5: location / {
try_files $uri $uri/ /index.php$is_args$query_string;
} macCMS: location /{
rewrite ^/vod-(.*)$ /index.php?m=vod-$ break;
rewrite ^/art-(.*)$ /index.php?m=art-$ break;
rewrite ^/gbook-(.*)$ /index.php?m=gbook-$ break;
rewrite ^/label-(.*)$ /index.php?m=label-$ break;
rewrite ^/map-(.*)$ /index.php?m=map-$ break;
} mvc: location /{
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$ last;
break;
}
} niushop: location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$ last;
break;
}
} phpCMS: location / {
###以下为PHPCMS 伪静态化rewrite法则
rewrite ^(.*)show-([-]+)-([-]+)\.html$ $/show.php?itemid=$&page=$;
rewrite ^(.*)list-([-]+)-([-]+)\.html$ $/list.php?catid=$&page=$;
rewrite ^(.*)show-([-]+)\.html$ $/show.php?specialid=$;
####以下为PHPWind 伪静态化rewrite法则
rewrite ^(.*)-htm-(.*)$ $.php?$ last;
rewrite ^(.*)/simple/([a-z0-\_]+\.html)$ $/simple/index.php?$ last;
} phpwind: location / {
rewrite ^(.*)-htm-(.*)$ $.php?$ last;
rewrite ^(.*)/simple/([a-z0-\_]+\.html)$ $/simple/index.php?$ last;
} sablog: location / {
rewrite "^/date/([0-9]{6})/?([0-9]+)?/?$" /index.php?action=article&setdate=$&page=$ last;
rewrite ^/page/([-]+)?/?$ /index.php?action=article&page=$ last;
rewrite ^/category/([-]+)/?([-]+)?/?$ /index.php?action=article&cid=$&page=$ last;
rewrite ^/category/([^/]+)/?([-]+)?/?$ /index.php?action=article&curl=$&page=$ last;
rewrite ^/(archives|search|article|links)/?$ /index.php?action=$ last;
rewrite ^/(comments|tagslist|trackbacks|article)/?([-]+)?/?$ /index.php?action=$&page=$ last;
rewrite ^/tag/([^/]+)/?([-]+)?/?$ /index.php?action=article&item=$&page=$ last;
rewrite ^/archives/([-]+)/?([-]+)?/?$ /index.php?action=show&id=$&page=$ last;
rewrite ^/rss/([-]+)?/?$ /rss.php?cid=$ last;
rewrite ^/rss/([^/]+)/?$ /rss.php?url=$ last;
rewrite ^/uid/([-]+)/?([-]+)?/?$ /index.php?action=article&uid=$&page=$ last;
rewrite ^/user/([^/]+)/?([-]+)?/?$ /index.php?action=article&user=$&page=$ last;
rewrite sitemap.xml sitemap.php last;
rewrite ^(.*)/([-9a-zA-Z\-\_]+)/?([-]+)?/?$ $/index.php?action=show&alias=$&page=$ last;
} seaCMS: location / {
rewrite ^/frim/index(.+?)\.html$ /list/index.php?$ last;
rewrite ^/movie/index(.+?)\.html$ /detail/index.php?$ last;
rewrite ^/play/([-]+)-([-]+)-([-]+)\.html$ /video/index.php?$-$-$ last;
rewrite ^/topic/index(.+?)\.html$ /topic/index.php?$ last;
rewrite ^/topiclist/index(.+?).html$ /topiclist/index.php?$ last;
rewrite ^/index\.html$ index.php permanent;
rewrite ^/news\.html$ news/ permanent;
rewrite ^/part/index(.+?)\.html$ /articlelist/index.php?$ last;
rewrite ^/article/index(.+?)\.html$ /article/index.php?$ last;
} shopex: location / {
if (!-e $request_filename) {
rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$ last;
}
} thinkphp: location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$ last; break;
}
} typecho: if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$ last;
} typecho2: location /typecho/ {
if (!-e $request_filename) {
rewrite ^(.*)$ /typecho/index.php$ last;
}
} weengine: fastcgi_ignore_client_abort on;
proxy_ignore_client_abort on;
rewrite ^/(data|attachment)/.+\.php$ /.html last;
location ~ \.htaccess$ {
deny all;
} wordpress: location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
} rewrite /wp-admin$ $scheme://$host$uri/ permanent; wp2: rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$ last;
if (!-e $request_filename){
rewrite ^.+?(/wp-.*) $ last;
rewrite ^.+?(/.*\.php)$ $ last;
rewrite ^ /index.php last;
} zblog: if (-f $request_filename/index.html){
rewrite (.*) $/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
常用的框架伪静态(Apache转Nginx)的更多相关文章
- Web服务(Apache、Nginx、Tomcat、Jetty)与应用(LAMP、CMS-WordPress&Ghost、Jenkins、Gitlab)
Web服务和应用是目前信息技术领域的热门技术.如何使用Docker来运行常见的Web服务器(包括Apache.Nginx.Tomcat等),以及一些常用应用(LAMP.CMS等).包括具体的镜像构建方 ...
- .NET平台常用的框架整理
基于.NET平台常用的框架整理 DotNet | 2016-03-31 17:13 (点击上方蓝字,可快速关注我们) 来源:天使不哭 链接:http://www.cnblogs.com/hgmyz/p ...
- 配置apache和nginx的tomcat负载均衡
概述 本篇文章主要介绍apache和nginx的相关配置,tomcat的相关安装配置我在前面有写过一篇,详细介绍通过两种配置方法配置nginx. tomcat配置参考:http://www.cnblo ...
- (转)apache和nginx的区别
nginx 相对 apache 的优点: 轻量级,同样起web 服务,比apache 占用更少的内存及资源 抗并发,nginx 处理请求是异步非阻塞的,而apache 则是阻塞型的,在高并发下ngin ...
- apache httpd, nginx, tomcat, jboss
web上的server都叫web server,但是大家分工也有不同的. nginx常用做静态内容服务和代理服务器(不是你FQ那个代理),直面外来请求转发给后面的应用服务(tomcat,django什 ...
- Java常用日志框架介绍
Java常用日志框架介绍 java日志概述 对于一个应用程序来说日志记录是必不可少的一部分.线上问题追踪,基于日志的业务逻辑统计分析等都离不日志.java领域存在多种日志框架,目前常用的日志框架包括L ...
- 基于.NET平台常用的框架整理<转载>
转载来自:http://www.cnblogs.com/hgmyz/p/5313983.html 基于.NET平台常用的框架整理 自从学习.NET以来,优雅的编程风格,极度简单的可扩展性,足够强大 ...
- 汇总java生态圈常用技术框架、开源中间件,系统架构及经典案例等
转自:http://www.51testing.com/html/83/n-3718883.html 有人认为编程是一门技术活,要有一定的天赋,非天资聪慧者不能及也.非也,这是近几年,对于技术这碗饭有 ...
- apache、nginx的虚拟域名配置和rewrite配置,以及web缓存的几种方式
web缓存一般用来缓解数据库压力. 通常有几种方法,文件静态化,缓存服务memcached.redis等. 伪静态,一般指在url上貌似访问静态html页的形式,这样有利于搜索引擎访问到网站页面,实际 ...
随机推荐
- [CSP-S模拟测试]:城市游戏(图论+DP)
题目传送门(内部题109) 输入格式 第一行,两个整数$n,m$. 接下来$m$行,每行三个整数$u,v,l$,描述了一条道路连接的两个路口的编号以及道路的长度. 输出格式 输出一行一个整数,为所求的 ...
- Django JWT
概述 如果各位不了解 JWT,不要紧张,它并不可怕. JSON Web Token(JWT)是一个非常轻巧的规范.这个规范允许我们使用JWT在用户和服务器之间传递安全可靠的信息. 让我们来假想一下一个 ...
- ES6 知识拓展
1.冻结对象 Object.freeze(obj) 方法可以冻结一个对象,冻结指的是不能向这个对象添加新的属性,不能修改其已有属性的值,不能删除已有属性,以及不能修改该对象已有属性的可枚举性.可配置性 ...
- ruby_类的调用及require的使用
在文件arrayTest_1中,定义class Liuyang内容如下:(通过require File.expand_path('../arrayTest_2',__FILE__) 来包含其他文件的文 ...
- project2016安装与破解
分步阅读 project2016发布增加了许多功能.Microsoft Office 2016 官方正式版发布!这是微软发布的全新办公软件套件,相比现有Office 2013的变化也不是很大,界面 ...
- [NLP] 语义网络与知识图谱入门(一)
语义网络与知识图谱入门(一) RDF/XML 本体:一种形式化的对于共享概念体系明确而又详细的说明.就是指一种抽象的模型,可以用来描述对象类型.属性以及关系类型所构成的世界. RDF/XML主要讲的就 ...
- 对保存的参数checkpoints进行可视化读取 1.pywrap_tensorflow.NewCheckpoint(获得checkpoint的读取器) 2.np.save(对npy文件进行保存) 3.tl.file.load_npy_to_any(对保存的npy文件进行读取)
1. pywrap_tensorflow.NewCheckpoint(path)获得checkpoint的读取器 参数说明: path表示checkpoint的路径 2.np.save(path, d ...
- Emacs 浏览网页
Emacs 浏览网页非常方便,还可以忽略掉那些烦人的小广告.特别是在看小说 的时候~ 在之前了解如何通过Emacs浏览网页时,大部分人使用的是w3m,折腾了半天,没能成功.后来无意间发现 ,有EWW ...
- 十三:jinja2过滤器之default过滤器和or过滤器
在模板里面有时候需要对传过来的数据进行一些处理,jinja2有一些内置的过滤器可以进行处理.类似于python内置函数,通过 “|” 进行使用,详见jinja2官方文档 使用方法:{{ 变量名|过滤器 ...
- 之前写的页面导出Excel表格
废话不多说,直接上代码 <%@ page language="java" import="java.util.*" pageEncoding=" ...