一次列表页伪静态的实现;结合nginx rewrite

nginx伪静态:
   rewrite ^/(.*)-htm-(.*)$ /$1.php?$2;
   将 list-html-t-3-p-4.html 转到list.php?t-3-p-4
t-3-p-4 用php转换成t=3&p=4格式

php配置文件
    之价格选项
    $_t = [
        0 => [
            'p' => [0,0],
            'txt' => 不限,
        ],
        0 => [
            'p' => [0,5000],
            'txt' => 5000以下,
        ]
    ]

前端选项:
    遍历_t ,a链接为{:do_url('t',0)}
    
do_url:    
    // 将url重写,即只替换当前url中的t,其他不变,当t为0即代表t不存在并且不显示在url中
原文地址:https://www.cnblogs.com/cl94/p/11846539.html