常用的框架伪静态(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页的形式,这样有利于搜索引擎访问到网站页面,实际 ...
随机推荐
- String、toString、String.valueOf()三个有啥区别?
今天在使用这个的时候发现,他们三者好像在某些场所都是可以用的,但是不免会让人想到那既然它们三者这么的相似,那么总有些什么区别吧.我也在网上找了一些资料看.自己也看了API文档,就将他们三的区别总结一下 ...
- C++入门经典-例3.14-使用while循环计算从1到10的累加
1:代码如下: // 3.14.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <iostream> usin ...
- Java程序设计第十周学习总结
Java课程知识梳理: 流的区分; 字符流与字节流的区别: 字节流是直接操作文件本身的,如果没有关闭字节流操作,文件会依然输出内容 而字符流在程序运行之后会发现文件没有任何的内容,这是因为字符流操作的 ...
- 后盾网lavarel视频项目---vue-axios基本用法
后盾网lavarel视频项目---vue-axios基本用法 一.总结 一句话总结: 都是npm安装,然后import引入vue,然后按手册使用就好了,很简单 二.vue-axios基本用法 转自或参 ...
- jQuery file upload 服务端返回数据格式
Using jQuery File Upload (UI version) with a custom server-side upload handler 正常的返回结果,即上传文件成功 Exten ...
- synchronized与Lock区别简单总结
类别 synchronized Lock 存在层次 Java的关键字,在jvm层面上 是一个类 锁的释放 1.以获取锁的线程执行完同步代码,释放锁 2.线程执行发生异常,jvm会让线程释放锁 在fin ...
- Servlet基础总结
1.Servlet概念: Java Servlet 是运行在 Web 服务器或应用服务器上的程序,它是作为来自 Web 浏览器或其他 HTTP 客户端的请求和 HTTP 服务器上的数据库或应用程序之间 ...
- Linux高级调试与优化——内存泄漏实战分析
最近在整理Linux调试方面的文档,正好碰到了一个内存泄漏踩栈的问题,借此机会记录一下分析过程. 首先,发现问题之后,赶紧看一下产生coredump文件没有,果不其然,产生了coredump,果断上g ...
- mysql5.7.25搭建mysql-5.7.25.tar.gz包(亲验)
STEP 1. 下载 去往官方下载MySQL包.http://dev.mysql.com mysql-5.7.25-linux-glibc2.12-x86_64.tar.gz STEP 2. 解压缩 ...
- HANA LOG日志过大处理办法
http://www.fenxiangzhe.net/archives/50 在SAP HANA 运维过程我们经常遇到因前期HANA LOG模式未设置成OVERWIRTE或者日志备份时间设置过长导致日 ...