本文来自实际建站过程中的记录,步骤可直接照做;环境不同导致的报错,见文末说明。
\n \n
\n 示例URL规则导入代码方法:解析规则config/rewrite.php代码设置方法:(需要删除原有的解析规则内容)---------------------------示例-------------
\n
示例URL规则导入代码方法:

解析规则config/rewrite.php代码设置方法:(需要删除原有的解析规则内容)

---------------------------示例----------------------
目录模式AA/BB/
栏目页:/aaa/bbb\n栏目分页:/aaa/bbb/p88.html\n内容页:/aaa/bbb/11.html\n内容分页:无

导入代码:
{"id":"6","type":"3","name":"目录模式AA\\/BB\\/","value":"{\\"list\\":\\"{pdirname}\\",\\"list_page\\":\\"{pdirname}\\\\\\/p{page}.html\\",\\"show\\":\\"{pdirname}\\\\\\/{id}.html\\",\\"show_page\\":\\"\\",\\"catjoin\\":\\"\\\\\\/\\"}"}
析规则config/rewrite.php代码:
"([\\w\\/]+)\\/p([0-9]+)\\.html" => "index.php?c=category&dir=$1&page=$2", //【目录模式AA/BB/】模块栏目列表(分页)({pdirname}/p{page}.html)\n "([\\w\\/]+)\\/([0-9]+)\\.html" => "index.php?c=show&id=$2", //【目录模式AA/BB/】模块内容页({pdirname}/{id}.html)\n "([\\w\\/]+)" => "index.php?c=category&dir=$1", //【目录模式AA/BB/】模块栏目列表({pdirname})
文件模式AA.html
栏目页:/aa.html\n栏目分页:/aa-p88.html\n内容页:/aa-11.html\n内容分页:无

导入代码:
{"id":"8","type":"3","name":"文件模式AA.html","value":"{\\"list\\":\\"{dirname}.html\\",\\"list_page\\":\\"{dirname}-p{page}.html\\",\\"show\\":\\"{dirname}-{id}.html\\",\\"show_page\\":\\"\\",\\"catjoin\\":\\"\\\\\\/\\"}"}解析规则config/rewrite.php代码:
"([A-za-z0-9 \\-\\_]+)-p([0-9]+)\\.html" => "index.php?c=category&dir=$1&page=$2", //【文件模式AA.html】模块栏目列表(分页)({dirname}-p{page}.html)\n"([A-za-z0-9 \\-\\_]+)-([0-9]+)\\.html" => "index.php?c=show&id=$2", //【文件模式AA.html】模块内容页({dirname}-{id}.html)\n"([A-za-z0-9 \\-\\_]+)\\.html" => "index.php?c=category&dir=$1", //【文件模式AA.html】模块栏目列表({dirname}.html)
目录模式AA/
栏目页:/aa/\n栏目分页:/aa/p88.html\n内容页:/aa/11.html\n内容分页:无

导入代码:
{"id":"9","type":"3","name":"目录模式AA","value":"{\\"list\\":\\"{dirname}\\",\\"list_page\\":\\"{dirname}\\\\\\/p{page}.html\\",\\"show\\":\\"{dirname}\\\\\\/{id}.html\\",\\"show_page\\":\\"\\",\\"catjoin\\":\\"\\\\\\/\\"}"}
解析规则config/rewrite.php代码:
"([A-za-z0-9 \\-\\_]+)\\/p([0-9]+)\\.html" => "index.php?c=category&dir=$1&page=$2", //【文件模式AA.html】模块栏目列表(分页)({dirname}/p{page}.html)\n"([A-za-z0-9 \\-\\_]+)\\/([0-9]+)\\.html" => "index.php?c=show&id=$2", //【文件模式AA.html】模块内容页({dirname}/{id}.html)\n"([A-za-z0-9 \\-\\_]+)" => "index.php?c=category&dir=$1", //【文件模式AA.html】模块栏目列表({dirname}/)
客户选版中心