How to configure the pseudo-static URL rules in AnQiCMS to optimize the display structure of website content links?

Calendar 👁️ 63

The importance of link structure in website operation is self-evident.A clear and meaningful URL not only enhances user experience, but also makes it easier for visitors to understand the content of the page, and is a key factor in search engine optimization (SEO).Cluttered, dynamic URLs with a large number of parameters often make it difficult for search engine spiders to crawl and are not conducive to keyword weight transfer.Therefore, converting dynamic URLs to static forms is a common choice in modern website construction.

AnQiCMS (AnQiCMS) understands this point, built-in powerful static URL configuration function, allowing you to flexibly define the link display structure of website content, thereby better serving SEO and user experience.

Why are Static URLs so Important?

Static page, as the name implies, it is still dynamically generated on the server side, but it appears as a static page in the URL address bar, for example, with.htmlending. Compared with having?id=123&category=abcThis kind of dynamic URL, pseudo-static URL has many advantages:

  • Improve SEO effectiveness: Search engines prefer concise, keyword-containing static URLs.The static link is easier for search engine spiders to crawl and index, and the keywords embedded in the link also help to improve the search ranking of the relevant page.
  • Improve user experience: A semantic URL, such as/news/anqicms-update-log.html,比/article.php?id=456Easier to understand and remember. Users can also have a more intuitive understanding of the content linked when sharing or revisiting.
  • Enhance the professionalism of the websiteA clear URL structure gives a professional and reliable impression, helping to establish user trust in the website.

The journey of pseudo-static configuration in AnQi CMS

In AnQiCMS, configuring the pseudo-static URL rules is a relatively intuitive process. You can find it in the “function management”module in the back end.Static rules” option.

1. Built-in pseudo-static mode: Get started quickly

To make it convenient for users, AnQiCMS provides four preset static URL modes that can meet the needs of most websites. These modes cover common URL structures, and you can apply one of them after selection and saving:

  • Numeric pattern: Usually adopted/{模块别名}-{ID}.htmlThe form, for example/article-123.html. This pattern is concise and clear, suitable for Chinese sites that pay attention to ID recognition.
  • Model naming pattern: The URL will include aliases of models (such as articles, products), for example/news/anqicms-update-log.html. Commonly used on English websites to highlight the model of the content.
  • Category naming pattern 1 & category naming pattern 2These patterns emphasize the category alias in URLs, and can be constructed into such as/technology/anqicms-features.htmlThis structure, choose based on your preference for Chinese or English sites.

These built-in patterns generally work well in most cases, allowing you to enjoy the benefits of pseudo-static without needing to understand the rule writing in detail.

2. Custom mode: Fine-grained control of link structure

If you have more personalized needs for built-in modes or want to create a unique URL structure, AnQiCMS'Custom patternsThis will be your **choice. It is an advanced feature that allows you to build links that fit your website's content positioning and SEO strategy through flexible variable combinations.

Please note the important reminder:The configuration of a custom mode needs to be very strict, any incorrect rule may cause the page to be inaccessible. After modification and saving, please make sure to thoroughly test all pages of the website.

In custom mode, you will be faced with six core static rules, each corresponding to different types of pages:

  • archive: is used for document detail pages (such as articles, product details).
  • categoryUsed for the category list page.
  • archive indexUsed for the model home page (such as the article list home page).
  • pageUsed for single page detail pages (such as About Us, Contact Information).
  • tag indexUsed for tag homepage.
  • tagUsed for the tag detail page.

Each rule is followed规则名===规则值The format. In the "Rule Value", you can flexibly use various variables provided by AnQiCMS to construct the URL:

  • {id}: Data ID, such as article ID, category ID.
  • {filename}: Custom link name for the data (such as the alias of a document, a single page alias, or a Tag alias).
  • {catname}Custom link name for category.
  • {catid}: Category ID.
  • {module}: Model table name or URL alias (configurable in the background content model).
  • {page}: Page number. It should be noted that the pagination variable{page}must be enclosed in parentheses, for example(-{page})is optional, and pagination will be displayed only when the page number is greater than 1.

Custom rule example:

Let us understand how to combine these variables through several common scenarios:

  1. Document details page (archive)

    • Requirement:The article link should include the model alias and article ID, such as/news/123.html.
      
      archive===/{module}/{id}.html
      
    • Requirement:I hope the article link includes the model alias and a custom filename, such as/news/anqicms-features.html.
      
      archive===/{module}/{filename}.html
      
      Here{filename}Originates from the 'Custom URL' field you filled in when adding a document. AnQiCMS will automatically generate a pinyin alias based on the document title, and you can also manually modify it.
    • Requirement:Hope the product detail page link includes the product model alias, category alias, and product ID, such as/products/electronics/tv-001.html.
      
      archive===/{module}/{catname}/{filename}-{id}.html
      
  2. Category list page (category)

    • Requirement:I hope the category link includes the model alias and category ID, such as/article/category/45.html.
      
      category===/{module}/category/{id}.html
      
    • Requirement:I hope the category link includes the model alias and custom category name, and supports pagination, such as/article/web-design(-{page}).html.
      
      category===/{module}/{catname}(-{page}).html
      
      Here{catname}Originating from the 'Custom URL' field you filled in the 'Document Category'.
  3. Single page detail page (page)

    • Requirement:I hope the single page link uses the custom filename directly, such as/about-us.html.
      
      page===/{filename}.html
      
      Here{filename}The value comes from the 'Custom URL' field you filled in the 'Page Management'.
  4. Tag detail page (tag)

    • Requirement:Hope the tag link includes an ID and supports pagination, such as/tag/123(-{page}).html.
      
      tag===/tag/{id}(-{page}).html
      
    • Requirement:I hope the tag link includes a custom tag name and supports pagination, such as/tags/website-security(-{page}).html.
      
      tag===/tags/{filename}(-{page}).html
      
      Here{filename}Originates from the "Custom URL" field filled in the "Document Tags".

When configuring these custom URLs, please make sure that the corresponding 'custom URL' fields are reasonably filled in the 'Content Management' interface under 'Publish Documents', 'Document Categories', and 'Document Tags', etc. The values of these fields will directly affect the static rules in the pseudo static rules.{filename}and{catname}The output of the variable.

Test and maintenance after configuration

No matter which pseudo-static you choose

Related articles

How does AnQiCMS support the switching and display of multilingual content to meet global promotion needs?

Faced with an increasingly globalized market, how can a corporate website effectively reach users all over the world, and language barriers are the first challenges to overcome.AnQiCMS is well aware of this, and therefore, from the very beginning of the system design, it has made multilingual support one of its core features, aiming to help users easily achieve global promotion and display of content. ### How AnQiCMS Tackles Globalization Challenges: The Foundation of Multilingual Support AnQiCMS provides a simple and efficient solution that allows your website to be presented in multiple languages to global users. This means regardless of where your target audience is located

2025-11-08

How to customize the AnQiCMS content model to achieve personalized display of specific data on the front page?

In content operation, we often encounter such situations: the standard 'article' or 'product' content type cannot fully meet the diverse information display needs of the website.For example, an event page may need "registration deadline" and "event location", and a recruitment information may need "position salary" and "work location", all of which are not possessed by traditional content models.At this time, the flexible content model customization function of AnQiCMS (AnQiCMS) is particularly important, as it helps us easily build data structures that conform to specific business logic

2025-11-08

How to implement diversified display of articles, products, etc. in AnQiCMS templates?

When building modern websites, the way content is presented is crucial for attracting users, conveying information, and achieving operational goals.A good content management system should not only make content publishing simple but also make the presentation of content flexible and varied.AnQiCMS is providing strong support in this aspect, through its flexible content model, powerful template engine, and rich tag system, allowing articles, products, and various other content to be displayed in diverse forms to visitors.Flexible content model: Building a differentiated content structure AnQiCMS

2025-11-08

How to use single quotes, double quotes and

During the template development process of Anqi CMS, handling single quotes, double quotes, and other special characters in content is a common requirement, especially in ensuring the correct display of the page and preventing security issues.The Anqi CMS template engine (similar to Django syntax) provides a smart and secure mechanism when handling these characters, allowing us to flexibly control the display of content. ### The default behavior of the template: Security first Firstly, we need to understand a core design concept of the Anqi CMS template: **Security first**.This means

2025-11-08

How do Sitemap, Robots.txt, and other advanced SEO tools in AnQiCMS affect the visibility of website content in search engines?

During the journey of website operation, we all hope that our content can be discovered by more potential users.And the search engine is undoubtedly the most important bridge connecting websites to users.To ensure that this bridge is unobstructed, our website needs to communicate effectively with search engines.

2025-11-08

How to customize the content display layout of the article detail page in AnQi CMS

AnQi CMS has excellent flexibility in content display, especially for article detail pages, it provides multi-level customization options, allowing us to finely control the layout of content display according to specific needs, whether it is for the entire model, specific categories, or an independent article.This not only involves adjustments in appearance, but also includes in-depth customization of the page content structure and information presentation.

2025-11-08

How to accurately display the field data of a custom content model on the front-end page?

In AnQiCMS, we often need to create various types of content according to the actual needs of the website.AnQiCMS's powerful custom content model feature is designed to meet this flexibility.It allows us to define dedicated fields for different types of content (such as articles, products, cases, etc.), thus enabling more precise management and display of information.How can we accurately call and display these custom field data on the website's front page?

2025-11-08

How does AnQiCMS display the latest article list and its publication time on the front end?

In website operation, displaying the latest published content to visitors in a timely manner can not only effectively improve user experience but also enhance the activity of the website.AnQiCMS (AnQiCMS) provides an intuitive and powerful template tag feature, allowing you to easily display the latest article list and its publication time on the website front page. ### Understanding Anqi CMS Article Display Mechanism Anqi CMS uses template tags to call and display website data.

2025-11-08