常用的框架伪静态(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页的形式,这样有利于搜索引擎访问到网站页面,实际 ...
随机推荐
- 10.Python内置函数一览表
为了提高程序员的开发效率,Python 提供了很多可以直接拿来用的函数(初学者可以先理解为方法),每个函数都可以帮助程序员实现某些具体的功能. 举个例子,在 Python 2.x 中 print 只是 ...
- R_Studio(癌症)数据连续属性离散化处理
对“癌症.csv”中的肾细胞癌组织内微血管数进行连续属性的等宽离散化处理(分为3类),并用宽值找替原来的值 癌症.csv setwd('D:\\data') list.files() dat=read ...
- Java常考面试题整理(三)
明天又要去面试,Good luck to me.,让我在这段时间换个新的工作吧. 41.在Java中,对象什么时候可以被垃圾回收? 参考答案: 当对象对当前使用这个对象的应用程序变得不可触及的时候,这 ...
- 黑马lavarel教程---6、简单验证
黑马lavarel教程---6.简单验证 一.总结 一句话总结: 1.验证的最简单实例:$request的validate方法,验证通过可以继续进行,验证失败就重定向 2.中文提示可以用中文语言包 3 ...
- shell脚本之awk、sed、grep案例
1.BEGIN END用法user DIR,内容显示用户名称.用户家目录 $NF为awk的内置变量,表示最后一行,$(NF-1)就表示倒数第二行,最后打印页脚 页眉显示 cat /e ...
- leetcode-easy-string-387 First Unique Character in a String
mycode 24.42% class Solution: def firstUniqChar(self, s: str) -> int: dic = {} for i in range(le ...
- 自动化框架Quantum Automation Framework+cucumber+perfecto
名词解释 Quantum: 一款基于JAVA的自动化框架,支持手机和桌面WEB的自动化测试.与cucumber和perfecto实现了整合,用于BDD自动化. Refer: http://projec ...
- [Java]将算术表达式(中序表达式Infix)转成后续表达式Postfix
Inlet类: package com.hy; import java.io.BufferedReader; import java.io.IOException; import java.io.In ...
- C#规范整理·多线程\异步\并行\任务
有一个领域的工作处理起来几乎总是最棘手的,这就是多线程编码.多线程编码是所有开发人员前进途中的一个坎,现在,该是尝试克服它的时候了. 1.区分异步和多线程应用场景 先看一个例子 private voi ...
- Eclipse_Package Presentation
Package Presentation ->Flat ->Hierarchical更常用