SHOPNC B2B2C多用戶(hù)商城系統(tǒng) Nginx下開(kāi)啟偽靜態(tài),偽靜態(tài)開(kāi)啟后,對(duì)系統(tǒng)的SEO極為有利,可以最大限度讓商城頁(yè)面被搜索引擎抓取,但在實(shí)際安裝中,很多客戶(hù)在這塊都會(huì)遇到各種各樣的問(wèn)題。
1. 編輯商城配置文件(data/config/config.ini.php)
- $config['url_model'] = true;
2. 編輯商城Nginx配置文件:
- server {
- #............................
- #............................
- # 追加
- if (!-e $request_filename)
- {
- rewrite ^/(shop|admin|circle|microshop|cms)/(.*)html$ /$1/index.php?$2;
- }
- location ~ \.php$ {
- #............................
- #............................
- # 追加
- fastcgi_param PATH_INFO $request_uri;
- }
- #............................
- #............................
- }
保存并重啟Nginx。