How to configure the pseudo-static rules for the AnQiCMS tag list page (`tagIndex`) and tag detail page (`tag`)?

Calendar 👁️ 60

As an experienced AnQi CMS website operations personnel, I am well aware that a clear and efficient URL rewriting rule is crucial for the SEO performance and user experience of a website. AnQi CMS provides great flexibility in URL rewriting management, especially for tag list pages (tagIndex) and tag detail pages(tagThe configuration, we can adjust in detail according to actual needs. Next, I will elaborate on how to configure the pseudo-static rules for these two types of tabs in AnQiCMS.

Deeply understand the pseudo-static rules of Anqi CMS

The AnQi CMS' pseudo-static rules allow us to convert dynamic-generated URLs into more readable and SEO-friendly static URLs.The system has several built-in default rules, such as number patterns, model naming patterns, and category naming patterns, which can meet most common needs.However, for tabs that require high customization or follow specific SEO strategies, custom static rules provide unparalleled flexibility.

The configuration entry for static rules is located under the "Function Management" menu in the AnQi CMS backend, select "Static Rules" to enter the configuration interface.Here, we can choose the system's preset rules, or switch to the 'custom mode' to manually edit the URL structure for each type of page.Each rule is by规则名===规则值defined in the form and provides a series of variables for us to combine, such as{id}(Data ID)、{filename}(Custom data link name)、{page}(pagination page number) and so on.

Configure the tag list page (tagIndexThe pseudo-static rule

The tag list page, usually referred to as the tag homepage, which displays all the tags on the website or displays some tags based on certain filtering conditions (such as the first letter) and usually supports pagination. In AnQiCMS, this page corresponds to thetag/index.htmlTemplate.

To configuretagIndexthe rewrite rules, we need to select "Custom Mode" on the page of "Function Management" > "Rewrite Rules". The system provides a default tagIndexRule example, it is usually in the form of:

tagIndex===/tags(-{page})

The meaning of this rule is:

  • /tags: This is the base URL path of the tag list page. All tag list pages will be in the form of:/tagsAt the beginning.
  • (-{page})This is an optional pagination variable. When the tag list page has multiple pages, such as the second page, the URL will become/tags-2If there is only one page, or it is the first page, the URL will not include-1or-0.

You can modify it based on your SEO strategy and user habitstagsThis word, or adjust the pagination display. For example, if you want the URL of the tag list page to be/all-tagsand the pagination to be displayed as/all-tags/page/2Then you can configure it like this:

tagIndex===/all-tags(/page/{page})

This rule uses/page/{page}As a pagination indicator, make it more in line with some blog or portal site habits.It is important to ensure the uniqueness and parseability of the rules and to keep them consistent with the overall URL structure of your website.After saving the rules, please be sure to clear the system cache and test on the front-end page to ensure that all label list page URLs can be generated and accessed correctly.

Configure tag detail page (tagThe pseudo-static rule

The tag detail page displays all related documents (articles, products, etc.) under a specific tag, and this page usually supports pagination. In AnQiCMS, this page corresponds to thetag/list.htmlTemplate.

In the custom mode,tagThe default rule example for the detail page is usually:

tag===/tag-{id}(-{page})

Let's break down this rule:

  • /tag-: This is the base URL prefix for the tag detail page.
  • {id}This is the unique identifier of the tag. For example, the URL of a tag with ID 10 might be/tag-10.html.
  • (-{page}): withtagIndexSimilar, this is an optional pagination variable, such as when there are multiple pages of documents under the label, the URL will contain pagination information, like/tag-10-2.html.

However, using an ID as the URL for the label detail page is not ideal for SEO, as IDs lack semantic information.The Anqi CMS allows us to set a 'custom URL' for each tag (this option can be seen when editing tags under 'Content Management' -> 'Document Tags').Once a label has been set with a custom URL (i.e.{filename}), we can use it in pseudo-static rules.{filename}Variables to generate more descriptive URLs.

Here are some based on{filename}common configuration examples:

  1. Use tags to customize URLs and optional pagination: tag===/tag/{filename}(-{page})This rule will generate such/tag/anqicms-tutorial.htmlor/tag/seo-optimization/2.htmlThe URL. This method combines readability and pagination support.

  2. A more concise custom URL (remove)tagprefix): tag==={filename}(-{page})If you want a shorter URL, you can directly use the custom URL of the tag, for example/anqicms-tutorial.html. But please note that this may conflict with the{filename}Rule conflicts, therefore, be cautious when configuring to ensure the uniqueness of the URL and avoid rewriting issues.

Important variable description:

  • {id}: The numeric ID of the tag.
  • {filename}: The custom URL alias set in the background (for example,anqicms-tutorial). Make sure that the custom URL is unique and only contains letters, numbers, and underscores, without spaces.
  • {page}Page number.

After configuration is complete, please make sure to save the rules and execute the "Update Cache" operation.Later, go to the website front end, click on different tabs and pagination links, and verify whether the URL is generated according to your expectations and can be accessed normally.

Implementation suggestions and precautions

  • uniqueness principleWhether it istagIndexOrtagThe rules should ensure that the generated URL is unique within the entire site.Avoid URL conflicts with other content (such as articles, single pages, categories) or the page may not be accessible or content may be displayed incorrectly.
  • SEO-friendly: Try to be{filename}Use English words or pinyin related to the label content, avoid using meaningless numbers or random characters.A concise and descriptive URL is more beneficial for search engine crawling and user understanding.
  • 301 RedirectIf you change the pseudo-static rules after the website goes live, the old URL may become invalid.In order to avoid traffic loss and SEO negative impact, it is necessary to make full use of the 301 redirect function of Anqi CMS to permanently redirect the old URL to the new URL.
  • corresponding to the: Ensure that your template directory containstag/index.htmlCorresponding totagIndex), andtag/list.htmlCorresponding totag) files, and that these template files can be called correctlytagList/tagDetailandtagDataListwith tags to render page content.

By following the above detailed configuration steps and注意事项, you can effectively set up pseudo-static rules for the tag list page and tag detail page in Anqi CMS, thereby improving the website's SEO performance and user experience.


Frequently Asked Questions (FAQ)

1. After I modified the pseudo-static rules of the tab page, will the search engine recognize the new URL? Will my old link become invalid?

Yes, the search engine will eventually recognize and index the new URL.However, this process takes time. After you modify the static rules, the old URL links will indeed become invalid, and users and search engines will not be able to directly access these old links.To avoid traffic loss and SEO weight loss, it is strongly recommended that you use the "301 Redirect Management" function in the AnQiCMS background immediately after modifying the rules to batch redirect all old tab page URLs to new URLs.This will make the search engine understand that this is a permanent URL change, and the weight of the old URL will be passed to the new URL, while users can also access it seamlessly.

2. Can the URL of the tag detail page of AnQiCMS not use ID but use a custom name instead (i.e.,{filename})?

Absolutely. AnQiCMS supports setting a "custom URL alias" for each tag (usually calledslugorfilename)。When configuring the pseudo-static rules for thetag) tag detail page,{filename}Replace variables{id}For example, you can set the rule totag==={filename}(-{page})The generated URL will be/您的自定义标签名.html(If not configured/Separator). Using a custom name for the URL has better readability and SEO-friendliness, but please ensure that each tag's custom name is unique to avoid URL conflicts.

3. I have configured the tag pseudo-static rules according to the tutorial, but the front-end tag page still shows a 404 error or style chaos. How should I troubleshoot?

When encountering such problems, you can check from the following aspects:

  • Clear the cacheFirst, click "Update Cache" in the AnQiCMS backend to ensure that the new pseudo-static rules have taken effect. The server and browser caches may also need to be cleared.
  • Check the syntax of the rules: Please carefully check the rules you entered in the "pseudo-static rules", ensuring there are no spelling errors, mismatched brackets, or incorrect variable usage.A minor grammatical error can cause the rule to fail.
  • Check the template file: Confirm that the current template directory existstag/index.html(corresponding to the tag list page) andtag/list.htmlThese two files corresponding to the tag detail page. If the file does not exist or the path is incorrect, the system will not be able to render the page.
  • URL conflictCheck if there are any other page type (such as articles, categories, single pages) static rules conflicting with tab page rules, causing the URL to be incorrectly parsed.
  • Nginx/Apache configurationIf you are manually configuring the server (instead of using tools like Baota panel), please make sure that your Nginx or Apache configuration file contains the correct pseudo-static rewrite rules, and forward all requests to AnQiCMS for processing.

Related articles

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

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 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 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

What is the correct way to use the pagination page number variable `{page}` when customizing the AnQi CMS static rules?

As a senior CMS website operation personnel of a well-known security company, I know that a clear and efficient static rule is crucial for the SEO performance and user experience of a website.AnQi CMS provides powerful pseudo-static features, allowing us to highly customize the URL structure according to our actual needs.Today, let's delve into the correct usage of the pagination page number variable `{page}` when customizing the static rules of an enterprise CMS.###

2025-11-06

Why does the page not open after configuring the AnQiCMS pseudo-static rules, and how can it be troubleshooted?

As an experienced CMS website operation personnel of an enterprise, I fully understand the importance of pseudo-static rules for website SEO and user experience.However, when configuring these rules, we often encounter the difficult problem of 'the page cannot be opened'.This not only affects the normal operation of the website, but may also lead to customer loss and a decline in search engine rankings.Below, I will analyze the common causes and troubleshooting methods of this problem in detail.What is pseudo-static and why is it configured?Before discussing the issue of the page not opening, we first need to understand what pseudo-static is and why it needs to be configured.

2025-11-06

In AnQiCMS custom static rule, what is the difference between `{id}` and `{filename}` variables, and when should they be used?

As an experienced website operator proficient in AnQiCMS, I know that URL structure is crucial for the SEO performance and user experience of the website.AnQiCMS powerful pseudo-static function allows us to flexibly customize website links, where `{id}` and `{filename}` are two core variables, each representing different meanings and usage scenarios.Understanding the differences and making appropriate choices is a key step in building an efficient website.### Optimize URL Structure

2025-11-06

How to use the `{catname}` variable in AnQiCMS's pseudo-static rules to implement a more friendly category URL?

As an experienced CMS website operations personnel for a well-known company, I know that every detail can affect the overall performance of the website, especially in terms of search engine optimization (SEO) and user experience.The URL structure is the foundation of a website, a friendly and clear URL can not only enhance users' understanding of the website content, but also an important consideration for search engine crawling and ranking.Today, let's discuss how to create more semantic and SEO-friendly category URLs using the `{catname}` variable in the pseudo-static rules of Anqi CMS.

2025-11-06