What are the commonly used variables supported in the URL structure when customizing AnQiCMS static rules?

Calendar 👁️ 58

As an experienced CMS website operation personnel of Anqi, I fully understand that a high-quality URL structure is crucial for the website's search engine optimization (SEO) and user experience.A clear, meaningful, and easily graspable URL that not only helps search engines better understand the page content, but also gives users a sense of direction when visiting.AnQiCMS provides great flexibility in setting up pseudo-static rules, especially with its custom mode, which allows operators to finely adjust the URL structure according to specific needs.

The core value of AnQiCMS pseudo-static rules

The built-in pseudo-static function of AnQi CMS aims to convert dynamic URLs into static or pseudo-static URLs, which is crucial for improving the SEO performance and user-friendliness of the website.Search engines prefer static URLs that are structured simply and contain keywords, as this helps them better parse and index page content.At the same time, users also find it easier to understand and remember this type of URL, thereby improving the overall accessibility of the website.AnQiCMS provides several predefined pseudo-static rules, such as numeric patterns and model naming patterns, to meet common application scenarios.However, for operators who pursue the ultimate SEO effect and personalized URL design, customizing the static rules is undoubtedly the key to bringing out the powerful functions of AnQiCMS.

Enable custom pseudo-static rules

To start customizing the pseudo-static rules, we need to enter the "Function Management" module of the AnQiCMS backend and then select "Pseudo-static Rules".Here, the system will provide a variety of built-in rules for selection. To enable custom configuration, you need to switch to 'Custom Mode'.The custom mode allows you to define the URL structure for different page types on the website, including document detail pages, category list pages, model home pages, single pages, tag list pages, and tag detail pages.Each rule is composed in the form of "rule name===rule value" and is constructed into a unique URL path through a combination of specific variables.

Common variables supported by AnQiCMS custom pseudo-static rules

When customizing pseudo-static rules, AnQiCMS provides a series of flexible variables that allow you to build rich URL structures according to content characteristics and SEO strategies. These variables are enclosed in curly braces{}Wrap, convenient for system identification and replacement with actual content.

Content ID ({id})

This variable represents the unique digital identifier for each item on the website.Whether it is an article, product, single page or tag, each entity has a corresponding ID in the database. Use{id}It can ensure the uniqueness of the URL, especially suitable for those scenarios where content titles may be duplicated or require concise URLs. For example, the URL of an article detail page can be set as/article/{id}.html.

Custom data link name ({filename})

{filename}The variable is the content (such as articles, single pages, tags) that is manually set by the user or automatically generated by the system as a URL alias when created or edited.It is usually a short, descriptive English or Pinyin string, an important tool for optimizing URL keywords.Embedding keywords in the URL can enhance the search engine's understanding of the page topic, which may lead to better ranking.For example, an article about an SEO guide, its URL can include/article/seo-guide.htmlof whichseo-guideit is{filename}the value.

Custom category link name ({catname})

with{filename}similar,{catname}A variable used to represent the custom URL alias of a category. It is also an optimized string used to describe the theme of the category. It is used when constructing the URL of the category list page.{catname}It makes the URL more semantically and readable. For example, a category about "news" might be designed as/news/{catname}/list.htmlof which{catname}The value can belatest-news.

Category ID ({catid})

This variable represents the unique identifier for the category. Although it may not be as good in SEO as{catname}intuitive, but{catid}It is very useful when you need to accurately point to a specific category by number ID, or as a concise URL pattern. The URL of a category list page may be set as/category/{catid}/list.html.

Model table name ({module})

{module}The variable represents the model identifier of the content. In AnQiCMS, you may have different content models such as 'article (archive)', 'product (product)', etc.{module}The URL alias will be automatically replaced for the model, helping to build a hierarchical URL structure. For example, the URL rule for the article detail page can be defined as/{module}/{filename}.htmlSo for an article, its URL might be/article/my-first-post.html.

Page number ({page})

{page}The variable is used to handle pagination on list pages. Its special feature is that it usually needs to be with parentheses()Combine to indicate that it is optional. For example(-{page})This means that when the list has only one page, no pagination information will appear in the URL, keeping the URL concise; when there are multiple pages, the URL will automatically add page numbers, for example/category/tech-news/page-2.htmlThis design avoids the appearance on the homepagepage-1Such redundant information is more SEO-friendly

Flexible combination to build the optimal URL

By flexibly combining the above variables, you can build URL structures for the AnQiCMS website that are both search engine friendly and meet user habits. For example, a common combination of custom rules may look like this:

  • Document detail page: archive===/{module}/{filename}-{id}.html
    • Example:/article/anqicms-tutorial-123.html
  • Category list page: category===/{catname}/list(-{page}).html
    • Example:/news/company-updates/list.html(Page 1)
    • Example:/news/company-updates/list-2.html(Page 2)
  • Single Page: page===/{filename}.html
    • Example:/about-us.html

When configuring custom rewrite rules, please be sure to test each rule carefully to ensure that it can be correctly parsed to the corresponding page, and pay attention to avoid creating duplicate or conflicting URLs.A well-planned URL structure is one of the foundations for long-term success of a website, and the AnQiCMS custom rewrite function provides strong support for this.

Frequently Asked Questions (FAQ)

1. What should I do if the website shows a 404 error page after modifying the custom static rules?

After you modify the伪static rule and encounter a 404 error, please first check if the syntax of your rule is correct, especially whether the variable names and delimiters meet the requirements of AnQiCMS.Secondly, make sure that your server's (such as Nginx or Apache) rewrite rules are correctly configured and point to the entry file or reverse proxy port of AnQiCMS.You may also need to clear the AnQiCMS system cache to ensure that the new rules take effect.If an old URL exists, it is strongly recommended to use the built-in 301 redirect function of AnQiCMS to permanently redirect the old URL to the new URL to avoid SEO loss and a decline in user experience.

2. When customizing the URL,{filename}or{catname}How is the value generated? Can I control it manually?

{filename}and{catname}The value is usually automatically generated by the system in the title you enter when creating or editing articles, products, single pages, or categories.You can find the "Custom URL" field on the edit page and manually modify these values according to your SEO needs.To optimize for SEO, it is recommended to set it to keywords highly relevant to the page content and ensure its uniqueness throughout the site.If the value entered manually is not unique, the system usually appends a random character to the end to ensure uniqueness.

3.{page}Variable(-{page})What special meaning does the format have? Why is it used this way?

(-{page})The format indicates the pagination page number{page}It is an optional part of the URL. It is usually used on list pages, and the URL will not be displayed when the list has only one page.(-1)orpage-1For example, such pagination information,/category/tech-news/list.htmlWhen the list has a second page and more pages, the URL will automatically add the page number, for example/category/tech-news/list-2.htmlThis design has two major advantages: one is to maintain the conciseness of the URL and avoid unnecessary redundant information; the other is to be more SEO-friendly, preventing search engines from treating the "first page" URL of no actual pagination (such as/list-1.htmlMisidentified as duplicate content, thereby optimizing the efficiency of crawling and weight distribution.

Related articles

Does AnQiCMS's custom rewrite rule belong to the 'advanced mode'? What are the potential risks when using it?

As a senior security CMS website operator, I am well aware of the importance of the website URL structure for search engine optimization (SEO) and user experience.The Anqi CMS provides strong flexibility in static rules, especially with its custom mode, which allows operators to finely adjust website links according to specific needs. ### Custom static rules: An inevitable choice for advanced mode In the static rule configuration of Anqi CMS, it is explicitly categorized that "Custom mode" is classified as "Advanced mode".

2025-11-06

What is the difference between the static rules of 'Category Naming Pattern 1' and 'Category Naming Pattern 2' in AnQiCMS?

As an experienced security CMS website operator, I know that a reasonable and SEO-friendly URL structure is crucial for the success of a website.A safe CMS offers a wide range of options for static rules to meet the needs of different types of websites and operational strategies.Today, we will delve into two commonly used classification naming patterns - 'Classification Naming Pattern 1' and 'Classification Naming Pattern 2', analyzing their design philosophy and applicable scenarios.

2025-11-06

What are the scenarios where AnQiCMS's 'Model Naming Pattern' static rules are suitable, and how to configure them?

As an experienced security CMS website operation person, I know that a clear and friendly URL structure is crucial for the website's search engine optimization (SEO) and user experience.The static rule function provided by AnQi CMS is one of the key tools to achieve this goal.Today, we will delve into one of the efficient and commonly used patterns - the pseudostatic rule of 'model naming pattern'.

2025-11-06

How can I enable the 'numeric mode' pseudo-static rule in one click in the AnQiCMS background?

As an experienced AnQiCMS website operator, I am well aware of the importance of website URL structure for user experience and Search Engine Optimization (SEO).AnQiCMS provides a comprehensive static rule management function, aimed at helping users optimize the website URL structure and improve search engine friendliness.This article will detailedly explain how to enable the 'number mode' static rules with one click in the AnQiCMS background.

2025-11-06

How to implement the URL structure of AnQiCMS document detail page in custom rules?

In AnQi CMS, customizing the URL structure of the document detail page is an important factor in improving the website's SEO performance and user experience.As a user of Anqicms who deeply understands content operation, I know the importance of a clear and meaningful URL for search engine crawling and user memory.AnQiCMS provides flexible pseudo-static rule management features, especially its "custom mode", which allows us to finely adjust the URL structure of document detail pages (archive) according to specific needs.Understanding the URL structure and SEO value of Anqi CMS Static pages

2025-11-06

How to write custom pseudo-static rules for AnQiCMS category list page (`category`) what are the skills?

As an experienced website operations manager, I am well aware of the importance of website URL structure for search engine optimization (SEO) and user experience.In AnQiCMS (AnQiCMS), the flexible configuration of pseudo-static rules is one of its core advantages. It allows us to create clear, meaningful, and easily crawlable URLs for different types of content, especially category list pages.The pseudo-static function of AnQi CMS is not only to beautify the URL, but also the key to improving the website's performance in search engines.A well-optimized URL structure that allows search engines to better understand page content

2025-11-06

How should the pseudo-static rules be reasonably configured for the AnQiCMS model homepage (`archiveIndex`)?

As an experienced security CMS website operation personnel, I know that a reasonable and friendly URL structure is crucial for the website's search engine optimization (SEO) and user experience.The AnQi CMS provides powerful static configuration functions, allowing us to flexibly define the link forms of website content according to actual needs.Today, we will delve into how to reasonably configure the pseudostatic rules of the AnQiCMS model homepage (`archiveIndex`).###

2025-11-06

How to set a custom pseudo-static URL path for AnQiCMS single page (`page`)?

As a senior security enterprise CMS website operations personnel, I am fully aware that a clear and easy-to-understand URL structure is crucial for the search engine optimization (SEO) and user experience of a website.AnQi CMS provides powerful pseudo-static features, allowing us to flexibly customize URL paths according to our needs, which is particularly important for optimizing single-page (`page`) optimization.### Understanding the pseudo-static URL in AnQi CMS Pseudo-static URL, as the name implies, looks like a static HTML file, but the actual content is dynamically generated by the backend

2025-11-06