Modify the default link style of dedecms, which is conducive to Seo Optimization

Source: Internet
Author: User

What we need to know is that the URL refers to the post path of the website pages. Generally, we will reduce it to the shortest, the shorter the better, which is conducive to search engine indexing and optimization, next we will briefly describe where to modify the post path to the shortest method:

1. First, we open the core website topic management. After creating a topic, we do not click Submit to directly click Advanced options, such:



2. the red field indicates the internal page naming rules and list naming rules, which means that when you post a post or the list is automatically generated, the list is automatically generated according to the rule idea. now we understand the meaning of each instruction in the rule: Dede tutorial-598080707.net{ y}, {m}, {d} year month day

{Timestamp} UNIX timestamp of int type

{Aid} Article ID

{Pinyin} pinyin + Article ID

{Py} pinyin radical + Article ID

{Typedir} topic directory

After the {CC} date + id is mixed, use the page number converted into a suitable letter {page} List 3. it is easy to get familiar with his meaning. Now we can omit the ones that are not generated in the URL path and delete them, so that the paths can be briefly manipulated.

When I use dedecms to build a website, I am used to omitting the date in the URL rule of the inner page. The following two lines will describe:

Default URL rule settings on the inner page (default path: {typedir}/{y}/{m} {d}/{aid1_.html)

However, the generated inner page path is: http://598080707.net/1/2011/07/09/135.html

This can be said to be too complicated. After a habitual individual modification, the date is omitted and the original

{Typedir}/{y}/{m} {d}/{aid+.html

Modify to the following:

{Typedir}/{aid).html

Then the generated path is: http://598080707.net/1/135.html

 

When creating a column, you can directly generate it according to the specified internal page rules you set:

If you have too many columns, It is troublesome to modify them. In this case, you only need to modify the PHP file and then automatically create a column according to the rules you set.

Open the File Include/common. Inc. php and find the following code: Dede technology-598080707.net

// Default naming rules for the document

$ Art_shortname = $ pai_df_ext = '.html ';

$ Pai_df_namerule = '{typedir}/{y}/{m} {d}/{aid}'. $ pai_df_ext;

Change to the naming rule you want. If my habits are used to it, I will change it:

// Default naming rules for the document

$ Art_shortname = $ pai_df_ext = '.html ';

$ Pai_df_namerule = '{typedir}/{aid}'. $ pai_df_ext;

After the modification is complete, only the columns you add will be automatically generated according to this rule.

 

When you add columns in batches, you can directly generate the columns according to the specified column rules you set:

Open the file Dede/templets/catalog_add.htm and find the following code:

{Typedir}/list_1_tid1__1_page0000.html

Modify it to the following code: (TID indicates the column ID, which is omitted if necessary)

{Typedir}/list_1_page0000.html

After the modification is complete, you will automatically generate columns in batch according to the rules you set.

In this way, the benefits of simplifying the short post path list path are greatly improved for website optimization.

Other source network tutorials are as follows:

1. dedecmsv5.6 modify the default document naming rules.

1. Add the default category modification separately. Modify the File Include/common. Inc. php.

Search code:

// Default naming rules for the document

$ Art_shortname = $ pai_df_ext = '.html ';

$ Pai_df_namerule = '{typedir}/{y}/{m} {d}/{aid}'. $ pai_df_ext;

2. Add default changes to categories in batches. Modify the file Dede/templets/catalog_add_quick.htm.

Search code:

<Tr>

<TD Height = "26" class = 'bline'> naming rules: </TD>

<TD class = 'bline'> <input name = "namerule" type = "text" id = "namerule" value = "{typedir}/{y} {m} {d }/define aid).html "size =" 40 "class =" pubinputs "/>

</TD>

</Tr> {typedir}/{y} {m} {d}/{aid} can be modified as needed. Note that the modification must be consistent before Seo can be successful.

Ii. dedecmsv5.6 modify the default list naming rules.

Two files need to be modified:

1. Add the default category modification separately. Modify the file Dede/templets/catalog_add.htm.

Search code:

<Tr>

<TD Height = "26"> list naming rules: </TD>

<TD>

<Input name = "namerule2" type = "text" id = "namerule2" value = "{typedir}/list_1_tid1__1_page0000.html" class = "pubinputs" style = "width: 250px"/>

</TD>

</Tr>

2. Add default changes to categories in batches. Modify the file Dede/templets/catalog_add_quick.htm.

Search code:

<Tr>

<TD Height = "26"> list naming rules: </TD>

<TD> <input name = "namerule2" type = "text" id = "namerule2" value = "{typedir}/list_1_tid1__1_page0000.html" size = "40" class = "pubinputs "/>

</TD>

</Tr> {typedir}/LIST _ {TID }_{ page}

Modify it to what you need. Note that the modification must be consistent, so that the SEO optimization of the default naming rules will be completed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.