联系官方销售客服

1835022288

028-61286886

求助 版主:官方研发技术组
自定义伪静态怎么设置动态打开正常对应的伪静态规则对应伪静态页
类型:迅睿CMS 更新时间:2021-07-20 13:28:50 静态 动态 index.php

自定义URL伪静态怎么设置

	 "company\/(.*)" => "index.php?s=company&c=show&field=weburl&value=$1",
	 "company\/(.*)\/jianjie" => "index.php?s=company&c=jianjie&field=weburl&value=$1",
	 "company\/(.*)\/chanpin" => "index.php?s=company&c=chanpin&field=weburl&value=$1",
	 "company\/(.*)\/xinwen" => "index.php?s=company&c=xinwen&field=weburl&value=$1",
	 "company\/(.*)\/lianxi" => "index.php?s=company&c=lianxi&field=weburl&value=$1",
index.php?s=company&c=show&field=weburl&value=jingyejixie  动态ID 打开正常

"company\/(.*)" => "index.php?s=company&c=show&field=weburl&value=$1",   对应的伪静态规则

company/jingyejixie/  对应伪静态页面   打开正常
index.php?s=company&c=jianjie&field=weburl&value=jingyejixie   动态ID 打开正常


"company\/(.*)\/jianjie" => "index.php?s=company&c=jianjie&field=weburl&value=$1",  对应的伪静态规则


company/jingyejixie/jianjie/    伪静态页面    404错误
index.php?s=company&c=jianjie&field=weburl&value=jingyejixie   动态ID 打开正常

我想以下面的方式打开

company/jingyejixie/jianjie/

请问伪静态规则怎么设置

回帖
  • 官方研发技术-阿华
    #1楼    官方研发技术-阿华
    2021-07-20 13:06:24
    Chrome 0
    1是顺序问题2是规则匹配有问题,尽量不要使用.*
    	 "company\/([a-z]+)\/jianjie" => "index.php?s=company&c=jianjie&field=weburl&value=$1",
    	 "company\/([a-z]+)\/chanpin" => "index.php?s=company&c=chanpin&field=weburl&value=$1",
    	 "company\/([a-z]+)\/xinwen" => "index.php?s=company&c=xinwen&field=weburl&value=$1",
    	 "company\/([a-z]+)\/lianxi" => "index.php?s=company&c=lianxi&field=weburl&value=$1",
    	  "company\/([a-z]+)" => "index.php?s=company&c=show&field=weburl&value=$1",
    满意答案
  • 苦逼的民工
    #2楼    苦逼的民工
    2021-07-20 13:28:50
    Chrome 0
    @官方研发技术-阿华:谢谢,你们的技术没话说,服务真心没话说