1. 程式人生 > >nginx配置偽靜態

nginx配置偽靜態

con html 直接 引入 bubuko info amp htm onf

最近做門戶網站,使用了的nginx重寫規則

項目目錄下寫好 nginx.conf文件

技術分享圖片

然後在打開nginx配置文件,在server引入對應的重寫規則的文件就可以了

技術分享圖片

當然直接寫在配置裏面

location /{
rewrite ^(.*)/equip(d+).html$ $1/index.php?m=content&c=index&a=lists&catid=$2 last;
}

這樣也是可以的,但是太多的情況下不推薦

nginx配置偽靜態