How to configure the pseudo-static rules in AnQiCMS to optimize URL structure and include categories, model aliases?

Calendar 👁️ 69

Building a clear, search engine-friendly URL structure in AnQiCMS is a very important aspect of website operation.By reasonably configuring the pseudo-static rules and ingeniously integrating categories and model aliases, it can not only improve the user experience but also significantly optimize the website's SEO performance.AnQiCMS as a high-performance content management system provides flexible pseudo-static features, allowing us to easily achieve these goals.

The importance of optimizing URL structure

Imagine you visit a website and see this kind of link:example.com/article.php?category_id=1&article_id=123Don't you think it's a bit long and hard to understand? But if the link is like this:example.com/news/industry-trends/anqicms-update.htmlYou can tell at a glance that this is an article about 'news' under 'industry trends' with the title 'AnQiCMS update'.

This is the charm of optimizing URL structure. A clear, concise URL with keywords, not only makes it easier for users to remember and share, but also helps search engines better understand the content of the page, thereby improving the crawling efficiency and ranking of the website.The pseudo-static feature of AnQiCMS is born for this.

The unique feature of AnQiCMS static page generation

The AnQiCMS static URL feature is not limited to simple ID conversion, it allows us to deeply customize URLs, including the aliases of content categories (catname), and the aliases of content models (module),even to the custom URL of specific content(filenameThese, also known as aliases or friendly URLs, are integrated into the final URL structure.This is undoubtedly a very practical feature for those who want to build highly customized, SEO-friendly websites.

Detailed steps to configure pseudo-static rules

To start the configuration, we need to enter the AnQiCMS backend management interface.

  1. Access the伪静态规则设置Log in to the AnQiCMS backend, find "Function Management" in the left menu, and click on "伪静态规则" there.

  2. Select custom modeAfter entering the static rule configuration interface, you may see several built-in preset rules, such as 'numeric mode', 'model naming mode', and so on.These built-in rules are usually sufficient in many cases, but in order to implement a complex URL structure that includes categories and model aliases, we need to select the "custom mode".

    The custom mode provides six sets of rule configurations, each corresponding to different types of pages on the website: document detail page, document list page, model homepage, single page, tag list page, and tag detail page. Each set of rules consists of规则名===规则值in the form of.

  3. Understand the available variables in pseudo-static ruleIn the custom rule values, there are some very important variable symbols, which are the key to building flexible URLs:

    • {id}This represents the unique numeric ID of the content, which is the most common identifier.
    • {filename}This variable is used to call the 'custom URL' (alias) you have set for articles, single pages, or tags. This is the key to achieving a friendly URL structure.
    • {catname}: Represents the 'Custom URL' (category alias) of the category.
    • {catid}: Represents the unique numeric ID of the category.
    • {module}: Represents the 'URL alias' of the content model.
    • {page}: Used for pagination, usually placed within parentheses, such as(-{page}), indicating that this is an optional pagination section.
  4. Example of constructing a URL rule that includes category and model aliasesWith these variables, we can flexibly combine and build URL structures that meet our needs.

    • Document details page (archive):If you want the URL structure of the article detail page to be/{模型别名}/{分类别名}/{文章别名}.htmlThen you can configure in the "Document Details" rule (archive) as follows:archive===/{module}/{catname}/{filename}.html

    • Document list page (category):Similarly, for the category list page (category), if you want the URL to be/{模型别名}/{分类别名}(-{page}).html(Considering pagination), it can be configured as:category===/{module}/{catname}(-{page}).htmlPlease note the pagination section(-{page})Placed in parentheses, it indicates that it is optional and will only be displayed when pagination is present, for exampleexample.com/news/industry-trends/page-2.html.

    • Model homepage (archiveIndex):The model homepage usually represents an overview of a content model, such as the article homepage, product homepage. You can

Related articles

How does AnQiCMS's 'Full Site Content Replacement' feature efficiently handle content strategy adjustments?

Today, with the increasing refinement and diverse strategies of content operation, how to adjust website content efficiently and accurately is a challenge facing every website operator.When brand information is updated, external link adjustments, or SEO strategy iterations occur, manually modifying thousands of contents on the website one by one is not only time-consuming and labor-intensive, but also prone to errors.Fortunately, AnQiCMS provides an extremely powerful tool - the "Full Site Content Replacement" feature, which can help operators with amazing efficiency and accuracy to deal with various content updates and strategy adjustments, and become a "secret weapon" for content management strategy adjustments.###

2025-11-08

How to define and use custom variables in AnQiCMS templates, such as the `{% with %}` tag?

In the template design of AnQi CMS, we often encounter scenarios where we need to temporarily store or pass data.In order to make the template code clearer, easier to read, and more powerful, AnQi CMS provides the mechanism for defining and using custom variables, the most commonly used of which are the `{% with %}` tag and the `{% set %}` tag.They can help us handle data flexibly in templates, avoiding repeated calculations or passing complex objects.

2025-11-08

What is the difference between the `{{variable}}` and `{% tag %}` syntax in AnQiCMS templates?

When using Anqicms to build a website, templates are the key to dynamic content display.We often see two special syntax structures in template files: `{{variable}}` and `{% tag %}`.Although they are all related to the display and processing of data, they play different roles and have different usage methods.Understanding the difference between them is the first step in efficiently using the Anqi CMS template.

2025-11-08

How to get the associated document list based on Tag ID and how to paginate it for `tagDataList` tags?

In website content operation, effectively organizing and displaying related content is crucial for improving user experience and the SEO performance of the website.AnQiCMS (AnQiCMS) provides powerful tag features, where the `tagDataList` tag is the key tool to help us achieve this goal.It can flexibly retrieve all related document lists based on the specified tag ID, and easily achieve content pagination display by coordinating with other tags.

2025-11-08

How to configure a separate domain and database information for a new site in AnQiCMS multi-site management?

AnQiCMS with its efficient and flexible multi-site management function provides great convenience to users, especially in scenarios where independent sites need to be built for different brands, products, or services.When you want to configure a separate domain and database information for a new site, AnQiCMS provides a clear and practical management process.This not only helps to isolate and secure the data, but also allows each site to have more independent operation and optimization space.### Understand the value of independent configuration for multiple sites Before discussing the specific operations

2025-11-08

How to implement multi-language content switching and display in AnQiCMS template?

In today's digital world, your website may need to be global for users.AnQiCMS fully understands this requirement and provides powerful multilingual support functions, allowing you to easily build and manage multilingual websites and better serve users from different countries and regions.How to implement multi-language content switching and display in AnQiCMS templates?Let's explore step by step. ### Understanding the multi-language mechanism of AnQiCMS: Handling two types of 'languages' In AnQiCMS, we need to distinguish between two types of 'language' content

2025-11-08

How does AnQiCMS increase the level of content operation automation through the timed publishing function?

Today, with the increasing emphasis on efficiency and user experience, the degree of automation in content operation is directly related to the competitiveness of the website.For many small and medium-sized enterprises and self-media operators, how to ensure high-quality, frequent, and precise targeting of content under limited human resources is a continuous challenge.AnQiCMS is an efficient and flexible content management system, and its built-in timed publishing function exactly provides strong support for solving this problem.Imagine such a scenario: You have meticulously planned marketing content for a week or even a month, including articles, product updates, and event previews.

2025-11-08

How to get the global configuration information of AnQiCMS template, such as the website name and logo?

In AnQiCMS template, cleverly obtain the global configuration of the website to make your website more flexible When designing or maintaining an AnQiCMS website template, we often encounter a need: to display unified global information on each page of the website, such as the name of the website, logo, filing number, or custom contact information.Manually adding this information to each page is not only inefficient but also time-consuming and laborious to update once it needs to be changed.

2025-11-08