最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

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

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ī)則
復(fù)制代碼 代碼如下:

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ī)則
復(fù)制代碼 代碼如下:

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ī)則
復(fù)制代碼 代碼如下:

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

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

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;

作者:朱茂海

相關(guān)文章

  • nginx開啟HSTS讓瀏覽器強(qiáng)制跳轉(zhuǎn)HTTPS訪問詳解

    nginx開啟HSTS讓瀏覽器強(qiáng)制跳轉(zhuǎn)HTTPS訪問詳解

    這篇文章主要介紹了nginx開啟HSTS讓瀏覽器強(qiáng)制跳轉(zhuǎn)HTTPS訪問詳解,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2019-05-05
  • Linux部署Nginx詳細(xì)圖文教程

    Linux部署Nginx詳細(xì)圖文教程

    這篇文章主要給大家介紹了關(guān)于Linux部署Nginx的相關(guān)資料,Nginx 是一個高性能的HTTP和反向代理web服務(wù)器,Nginx是一款輕量級的Web服務(wù)器/反向代理服務(wù)器及電子郵件(IMAP/POP3)代理服務(wù)器,需要的朋友可以參考下
    2024-01-01
  • 深入解析nginx路由location匹配規(guī)則及其優(yōu)先級

    深入解析nginx路由location匹配規(guī)則及其優(yōu)先級

    Nginx是一款高性能的Web服務(wù)器和反向代理服務(wù)器,它的路由功能是通過location指令來實現(xiàn)的,location指令用于匹配請求的URL,并將請求轉(zhuǎn)發(fā)到相應(yīng)的處理程序或靜態(tài)文件,需要的朋友可以參考下
    2023-10-10
  • Crontab+Shell做Nginx日志切割腳本實例代碼

    Crontab+Shell做Nginx日志切割腳本實例代碼

    本篇文章主要介紹了Crontab+Shell做Nginx日志切割腳本實例代碼,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-05-05
  • Nginx設(shè)置HttpOnly Secure SameSite參數(shù)解決Cookie信息丟失

    Nginx設(shè)置HttpOnly Secure SameSite參數(shù)解決Cookie信息丟失

    本文主要介紹了Nginx中Cookie缺少SameSite屬性的問題,并詳細(xì)解釋了HttpOnly、Secure和SameSite屬性的作用,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2024-11-11
  • nginx 配置靜態(tài)緩存及靜態(tài)緩存文件沒有生成的問題及解決方案

    nginx 配置靜態(tài)緩存及靜態(tài)緩存文件沒有生成的問題及解決方案

    這篇文章主要介紹了nginx 配置靜態(tài)緩存及靜態(tài)緩存文件沒有生成的問題及解決方案,本文分步驟結(jié)合實例代碼給大家介紹的非常詳細(xì),需要的朋友可以參考下
    2023-11-11
  • 解決Nginx配置靜態(tài)資源文件404 Not Found問題

    解決Nginx配置靜態(tài)資源文件404 Not Found問題

    在使用Nginx作為靜態(tài)資源服務(wù)器時,如果配置了根目錄root導(dǎo)致404錯誤,而使用前綴URL配置alias則需要正確處理目錄路徑,使用alias時要確保目錄名后加‘/’,并且在需要時使用root和alias配置,本文介紹Nginx配置靜態(tài)資源文件404 Not Found問題解決方法,感興趣的朋友一起看看吧
    2025-03-03
  • nginx將https協(xié)議反向代理到http協(xié)議請求上的實現(xiàn)

    nginx將https協(xié)議反向代理到http協(xié)議請求上的實現(xiàn)

    本文主要介紹了nginx將https協(xié)議反向代理到http協(xié)議請求上的實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-10-10
  • 基于nginx的靜態(tài)網(wǎng)頁部署的實現(xiàn)

    基于nginx的靜態(tài)網(wǎng)頁部署的實現(xiàn)

    這篇文章主要介紹了基于nginx的靜態(tài)網(wǎng)頁部署的實現(xiàn),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-06-06
  • keepalived+nginx實現(xiàn)雙服務(wù)器主備方案

    keepalived+nginx實現(xiàn)雙服務(wù)器主備方案

    本文主要介紹了使用keepalived和nginx實現(xiàn)雙服務(wù)器主備方案,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2024-12-12

最新評論

会宁县| 稻城县| 丁青县| 恩施市| 西乌珠穆沁旗| 平武县| 胶州市| 洞口县| 土默特左旗| 多伦县| 墨江| 肇东市| 万安县| 望城县| 名山县| 余干县| 蓬莱市| 昆明市| 宁远县| 博罗县| 青州市| 霍邱县| 中牟县| 鸡西市| 安新县| 黄陵县| 乐东| 武陟县| 通河县| 游戏| 修文县| 南城县| 邳州市| 子长县| 大丰市| 彭州市| 铜陵市| 鲜城| 德格县| 寻乌县| 馆陶县|