常用的框架伪静态(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页的形式,这样有利于搜索引擎访问到网站页面,实际 ...
随机推荐
- DVWA--Brute Force
这次我们尝试的内容是DVWA的暴力破解 --lower 先抓取一个登陆的包 然后发送到后在Position选项中设置需要破解的变量.Burpsuite会自动设置许多变量,单击“Clear”按钮,把默认 ...
- x-admin
https://blog.csdn.net/u014793102/article/details/80316335
- Linux上python3的安装和使用
centos7默认是装有python的,咱们先看一下 #检查python版本 [root@oldboy_python ~ 17:23:54]#python -V Python 2.7.5 但是 pyt ...
- spring整合之后运行报什么只读错误。Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.
解决办法, 再大dao的实现类上添加注解: @Transactional(readOnly = false ) 不让它只读就行了
- 通过JVM日志来进行安全点分析
许多事件都可能会导致JVM暂停所有的应用线程.这类暂停又被称为”stop-the-world”(STW)暂停.触发STW暂停最常见的原因就是垃圾回收了(github中的一个例子),但不同的JIT活动( ...
- C++入门经典-例5.18-通过引用交换数值
1:在C++中,函数参数的传递方式主要有两种,即值传递和引用传递.值传递是指在函数调用时,将实际参数的值赋值一份传递到调用函数中,这样如果在调用函数中修改了参数的值,其改变将不会影响到实际参数的值.而 ...
- 【CentOS】yum安装教训
前言:本来想安装sl在新安装的centos7上,网上搜了教程,很多都是先要你yum -y update,如下: 1.更新yum源: yum -y update 2.依赖安装: wget http:// ...
- 在Linux上安装ipmitool
https://blog.csdn.net/bnanoou/article/details/43985839
- 浏览器端-W3School-JavaScript:JavaScript RegExp 对象
ylbtech-浏览器端-W3School-JavaScript:JavaScript RegExp 对象 1.返回顶部 1. JavaScript RegExp 对象 RegExp 对象 RegEx ...
- 【转载】解决jquery-1.10.2.min.map 404 Not Found错误
最近写代码遇到问题,报错说jquery-1.10.2.min.map NOT FOUND.但是我检查了几遍代码发现代码中没有问题,而且根本就没有包含甚至提到jquert-1.10.2.min.map这 ...