欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

國內(nèi)一些常用PHP的CMS的Nginx服務器的偽靜態(tài)規(guī)則整理

 更新時間:2011年03月31日 01:14:20   作者:  
當我們從apache服務器轉(zhuǎn)向Nginx服務器的時候,它們的偽靜態(tài)規(guī)則就不一樣了,所以你熟悉Nginx服務器的偽靜態(tài)規(guī)則,自己寫當然也好
但很多網(wǎng)友還是不太了解Nginx服務器的偽靜態(tài)規(guī)則的,而如果你安裝的是一些常用的程序,如WordPress,PHPCMS,ECSHOP,SHOPEX,Discuz 7,那偽靜態(tài)規(guī)則就有現(xiàn)成的了。為方便各位站長,收集了這幾個常用程序的偽靜態(tài)規(guī)則。
WordPress偽靜態(tài)規(guī)則
復制代碼 代碼如下:

location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}

PHPCMS偽靜態(tài)規(guī)則
復制代碼 代碼如下:

location / {
###以下為PHPCMS 偽靜態(tài)化rewrite規(guī)則
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3;
rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3;
rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2;
####以下為PHPWind 偽靜態(tài)化rewrite規(guī)則
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
}

ECSHOP偽靜態(tài)規(guī)則
復制代碼 代碼如下:

if (!-e $request_filename)
{
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite "^/feed-c([0-9]+)\.xml$” /feed.php?cat=$1 last;
rewrite “^/feed-b([0-9]+)\.xml$” /feed.php?brand=$1 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=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite “^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$” /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
rewrite “^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$” /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
rewrite “^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$” /category.php?id=$1&brand=$2&page=$3 last;
rewrite “^/category-([0-9]+)-b([0-9]+)(.*)\.html$” /category.php?id=$1&brand=$2 last;
rewrite “^/category-([0-9]+)(.*)\.html$” /category.php?id=$1 last;
rewrite “^/goods-([0-9]+)(.*)\.html” /goods.php?id=$1 last;
rewrite “^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$” /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
rewrite “^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$” /article_cat.php?id=$1&page=$2 last;
rewrite “^/article_cat-([0-9]+)(.*)\.html$” /article_cat.php?id=$1 last;
rewrite “^/article-([0-9]+)(.*)\.html$” /article.php?id=$1 last;
rewrite “^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html” /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
rewrite “^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html” /brand.php?id=$1&cat=$2&page=$3 last;
rewrite “^/brand-([0-9]+)-c([0-9]+)(.*)\.html” /brand.php?id=$1&cat=$2 last;
rewrite “^/brand-([0-9]+)(.*)\.html” /brand.php?id=$1 last;
rewrite “^/tag-(.*)\.html” /search.php?keywords=$1 last;
rewrite “^/snatch-([0-9]+)\.html$” /snatch.php?id=$1 last;
rewrite “^/group_buy-([0-9]+)\.html$” /group_buy.php?act=view&id=$1 last;
rewrite “^/auction-([0-9]+)\.html$” /auction.php?act=view&id=$1 last;
rewrite “^/exchange-id([0-9]+)(.*)\.html$” /exchange.php?id=$1&act=view last;
rewrite “^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$” /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([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=$1&page=$2 last;
rewrite “^/exchange-([0-9]+)(.*)\.html$” /exchange.php?cat_id=$1 last;
}

SHOPEX偽靜態(tài)規(guī)則
復制代碼 代碼如下:

location / {
if (!-e $request_filename) {
rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last;
}
}

Discuz 7偽靜態(tài)規(guī)則
復制代碼 代碼如下:

rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page\%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;

作者:朱茂海

相關文章

  • Nginx?代理解決跨域問題多種情況分析

    Nginx?代理解決跨域問題多種情況分析

    這篇文章主要介紹了Nginx?代理解決跨域問題分析,通過用網(wǎng)站8080訪問Nginx代理后的接口地址,報錯分為多種情況,每種情況給大家詳細分析,感興趣的朋友一起看看吧
    2022-01-01
  • nginx里集成php模塊安裝配置步驟詳解

    nginx里集成php模塊安裝配置步驟詳解

    這篇文章主要為大家介紹了nginx里集成php模塊安裝配置步驟詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2023-08-08
  • 瀏覽器控制臺報錯Failed to load module script:解決方法

    瀏覽器控制臺報錯Failed to load module script:解決方

    這篇文章主要為大家介紹了瀏覽器控制臺報錯Failed to load module script:解決方法,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2022-11-11
  • Nginx 反向代理并緩存及緩存清除的方法

    Nginx 反向代理并緩存及緩存清除的方法

    本篇文章主要介紹了Nginx 反向代理并緩存及緩存清除的方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-07-07
  • 探究Nginx中reload流程的原理真相

    探究Nginx中reload流程的原理真相

    這篇文章主要介紹了探究Nginx中reload流程的原理真相,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2019-12-12
  • 5分鐘搞定Nginx安裝的教程

    5分鐘搞定Nginx安裝的教程

    下面小編就為大家分享一篇5分鐘搞定Nginx安裝的教程,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2017-11-11
  • 圖文詳解Nginx多種匹配方式

    圖文詳解Nginx多種匹配方式

    nginx作為一款高性能的服務器,用途很多,下面這篇文章主要給大家介紹了Nginx多種匹配方式的相關資料,文中通過圖文介紹的介紹的非常詳細,需要的朋友可以參考下
    2022-05-05
  • Nginx基于gzip壓縮提高訪問速度

    Nginx基于gzip壓縮提高訪問速度

    這篇文章主要介紹了Nginx基于gzip壓縮提高訪問速度,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下
    2020-06-06
  • Nginx負載均衡(架構(gòu)之路)詳解

    Nginx負載均衡(架構(gòu)之路)詳解

    這篇文章主要為大家詳細介紹了Nginx負載均衡的相關資料,如何配置三臺服務器,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-07-07
  • nginx 匹配規(guī)則小總結(jié)(推薦)

    nginx 匹配規(guī)則小總結(jié)(推薦)

    這篇文章主要介紹了nginx 匹配規(guī)則小總結(jié)及nginx配置proxy_pass路徑帶/問題,需要的朋友可以參考下
    2018-07-07

最新評論