B2B2C商城 Nginx下开启伪静态,伪静态开启后,对系统的SEO极为有利,可以最大限度让商城页面被搜索引擎抓取,但在实际安装中,很多客户在这块都会遇到各种各样的问题。
1. 编辑商城配置文件(data/config/config.ini.php)
1
$config['url_model'] = true;
2. 编辑商城Nginx配置文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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。

相关文章:

  • 2021-05-06
  • 2022-02-20
  • 2022-02-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-02-27
  • 2021-07-10
  • 2021-06-01
相关资源
相似解决方案