求一个.htaccess的伪静态规则
/index.php?mod=webdir&cid=10 伪静态成 /category/10-1.html
/index.php?mod=webdir&cid=10&page=2 伪静态成 /category/10-2.html
在.htaccess下应该怎么写呢,10是栏目ID,2是栏目列表分页
------解决方案--------------------
RewriteRule ^category\/([0-9]{1,})-1.html$ index.php?mod=webdir&cid=$1 [L]
RewriteRule ^category\/([0-9]{1,})-([0-9]{1,}).html$ index.php?mod=webdir&cid=$1&page=$2 [L]
------解决方案--------------------
^/category\/([0-9]+)\-([0-9]+)\.html$ index.php?mod=webdir&cid=$1&page=$2
------解决方案--------------------
^\/category\/([0-9]+)\-([0-9]+)\.html$ /index.php?mod=webdir&cid=$1&page=$2
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号