In website operation, a clear and search engine-friendly URL address can not only improve user experience, but is also a key link in website SEO optimization.AnQiCMS (AnQiCMS) fully understands this point, therefore, it provides flexible and versatile static URL customization functions to help users easily create article page links that comply with SEO practices.

AnQi CMS Overview of URL Rewriting Capabilities

The technology of pseudo-statics, as the name implies, is to make dynamic pages look like static pages with fixed and meaningful URLs.This is greatly beneficial for search engine crawling and user memory.AnQi CMS is a system focused on enterprise-level content management, built-in powerful static and 301 redirect management functions, aimed at helping small and medium-sized enterprises, self-media operators to effectively improve the SEO performance of their websites.

The system provides several convenient pseudo-static rules by default, such as number mode (based on article ID as the URL basis), model naming mode (with content model alias as the prefix of the URL), and category naming mode (with category alias as the prefix of the URL).These preset rules can already meet the basic needs of most websites.However, for users who pursue the ultimate SEO optimization and personalized URL structure, Anqi CMS also provides a "custom mode" that allows us to finely adjust the URL structure of article pages according to specific needs.

Configure the URL rewrite rule for the custom article page

To customize the URL rewrite rule for the article page, we need to enter the Anqi CMS backend management interface for operation.

  1. Enter the pseudo-static rule settingsFirst, log in to the Anqi CMS backend, find and click on "Function Management" in the left navigation bar, and then select "Pseudo-static Rule".

  2. Select custom modeOn the page of pseudo-static rule management, you will see several preset rule options.To achieve more flexible customization, we need to select 'Custom Mode'.After selection, a text area allowing you to enter a custom rule will expand below.

  3. Understand the composition of the rulesThe AnQi CMS custom pseudo-static rules adopt规则名===规则值the format. Among them,规则名rules for different types of pages are defined, while规则值determines the specific URL structure of the page type.

    For the article page and its associated list pages, the following rule names are of primary concern:

    • archiveis used forDocument detail page(i.e., the article page) URL structure.
    • categoryis used forCategory list pageThe URL structure, articles usually belong to a category.
    • archiveIndexis used forContent model home pageThe URL structure, for example, the homepage of the 'article' model.
    • tagis used forTag detail pageThe URL structure, articles may be associated with multiple tags.

    In规则值In Chinese, we can use the following common variables to construct URLs:

    • {id}: The numeric ID of the article or category, automatically generated by the system.
    • {filename}: The custom URL alias of the article, single page, or tag.
    • {catname}Custom URL alias for a category.
    • {catid}: The numeric ID of the category.
    • {module}URL alias for content model.
    • {page}: The pagination page number, usually used on list pages, should be placed within parentheses, such as.(-{page}).
  4. Example of pseudo-static rules for building article pages and their related URLs.

    By combining these variables, we can create various URL structures that meet SEO requirements. The following are some common pseudo-static rules for article pages and their related page settings examples.

    • The most common article detail page structure:/{module}/{filename}.html

      archive===/{module}/{filename}.html
      

      This rule is highly recommended, as it uses the model alias of the article as the first-level directory, followed by the custom filename of the article, which is clear in structure and easy for search engines to understand. For example, if a 'AnQi CMS Tutorial' article has the model alias asarticleCustom URL is set toanqicms-tutorialThen the link will be/article/anqicms-tutorial.html.

    • The article detail page structure based on category alias:/{catname}/{filename}.html

      archive===/{catname}/{filename}.html
      

      If your website content hierarchy mainly depends on categories, you can use this rule. It uses the custom URL alias of the category the article belongs to as the primary directory. For example, the category alias iswebsite-seoThe article's custom URL isurl-optimizationThe link will be/website-seo/url-optimization.html.

    • A concise article detail page structure (without model or category):/{filename}.html

      archive==={filename}.html
      

      This rule makes the URL shortest, but make sure that{filename}Uniqueness throughout the entire site, otherwise URL conflicts may occur. Suitable for websites with simple content hierarchies or those requiring extremely flattened URLs.

    • Rules for category list pages:/{module}/list-{catname}(-{page}).html

      category===/{module}/list-{catname}(-{page}).html
      

      This will generate the URL for your category list page like/article/list-anqicms-guide.htmlor/product/list-new-products-2.html(with pagination).

    • Rules for the tag list page:/tag/{filename}(-{page}).html

      tag===/tag/{filename}(-{page}).html
      

      This will generate the URL for the tag page like/tag/anqicms(-2).htmlURL.

    • Rules for the model homepage:/{module}.html

      archiveIndex==={module}.html
      

      For example, the home link of the article model might be/article.html.

    Please enter the value of the rule you have selected in the corresponding position on the pseudo-static rule setting page. A complete custom pattern rule configuration may look like this:

    archive===/{module}/{filename}.html
    category===/{module}/{catname}(-{page})
    archiveIndex===/{module}.html
    page===/{filename}.html
    tagIndex===/tags(-{page})
    tag===/tag/{filename}(-{page})
    
  5. setting{filename}and{catname}In the custom URL of{filename}and{catname}The variable is the key part manually set by the user.

    • Custom URL of the article ({filename}):Under "Content Management" in the background, add document