How to simplify the naming rules of Dreamweaver list and internal page URL
What we need to know is that the URL refers to Generally, we will reduce the post path of the internal pages of the site to the shortest. The shorter, the better, which is conducive to search engine inclusion and optimization. Let’s briefly describe where to modify the post path to the shortest way: (recommended tutorial : dedecms tutorial)
1. First, we open Core Website Column Management. After creating the column, click Submit directly without clicking Advanced Options, as shown below:
##2. The red part of the icon above refers to the internal page naming rules and list naming rules, which means that when you publish a post or automatically generate a list, it is automatically generated according to the idea of this rule. Now we understand the meaning of each command in the rules:
{Y}, {M}, {D} year, month and day {timestamp} UNIX timestamp of INT type {aid} Article ID {pinyin} Pinyin article ID {py} Pinyin radical article ID {typedir} Column directory {cc} The date ID is mixed and converted into appropriate letters {page} The page number of the list3. Once you are familiar with its meaning, it will be easier to handle. Now we can omit and delete unnecessary ones generated in the URL path, so that the path can be shortened by manipulation.
When I use DEDECMS to build a website, I am used to omitting the dates in the URL rules for internal pages. The following two lines describe: Default URL rule settings for internal pages ( Default path: {typedir}/{Y}/{M}{D}/{aid}.html) However, the generated internal page path is: //m.sbmmt.com/1/ 2019/11/16/135.htmlIt can be said that it is really too complicated. After personal modification, I omitted the date and modified the original{typedir}/{Y}/{M}{D}/{aid}.html
{typedir}/{aid}.html
include/common.inc.php Find the following code:
//文档的默认命名规则 $art_shortname = $cfg_df_ext = '.html'; $cfg_df_namerule = '{typedir}/{Y}/{M}{D}/{aid}'.$cfg_df_ext;
//文档的默认命名规则 $art_shortname = $cfg_df_ext = '.html'; $cfg_df_namerule = '{typedir}/{aid}'.$cfg_df_ext;
{typedir}/list_{tid}_{page}.html
{typedir}/list_{page}.html
The above is the detailed content of How to simplify the naming rules of Dreamweaver list and internal page URL. For more information, please follow other related articles on the PHP Chinese website!