How to customize the URL rewrite rules of AnQiCMS website to optimize search engine display effect?

Calendar 👁️ 85

In website operations, the structure of URLs (URLs) has a crucial impact on search engine optimization (SEO) and user experience.A clear, meaningful URL can not only help search engines better understand the page content, but also allow users to expect the page content before clicking, enhancing trust.AnQiCMS as a system focusing on enterprise content management, well aware of this, therefore provides a flexible custom static rule feature.

This article will guide you to understand how to customize the pseudo-static rules in AnQiCMS, thereby optimizing your website's performance in search engines.

The first part: Understanding pseudo-static and its value to search engines

Before starting to customize, let's first understand what pseudo-static is. When you visit a webpage, you will usually see two types of URLs:

  1. Dynamic URLs:URLs contain question marks (?), equals signs (=), and various parameters, such asexample.com/article.php?id=123&category=news. Such URLs are usually dynamically generated by the server based on the request.
  2. Static URLs:URLs start with.html/.htmFiles ending with such extensions look like real existing files, for exampleexample.com/news/latest-article.html.
  3. Static URL:It is very similar in form to a static URL, and is usually ended with a file extension, but the content of the page is still dynamically generated by the server.This is the pseudo-static function provided by AnQiCMS.

Why is static URL so important for SEO?

  • Search engine friendly:Search engines prefer websites with clear structures and no complex parameters. Static URLs are easier to crawl and index, which helps improve the inclusion rate of the website.
  • Keyword display:The static URL allows you to include keywords related to the page content, which provides additional signals to search engines indicating the topic of the page, thereby potentially improving the ranking in relevant search results.
  • User Experience:A concise and clear URL is easier to remember and share, and users are also more inclined to click on those that look 'clean'.It increases the user's trust in the website content and makes it easier to judge the content the link may point to.
  • Avoid duplicate content:Sometimes dynamic URLs may generate multiple access paths with the same content due to different parameter combinations, which may be recognized as duplicate content by search engines.The static rule can effectively solve this problem, ensuring that each independent content has only one clear access path.

Part two: AnQiCMS built-in pseudo static rules

AnQiCMS has built four commonly used pseudo-static rules for the convenience of users, which can serve as the basic configuration for your website.You can find the 'Static Rules' option under the 'Feature Management' menu in the background.

  1. Numeric mode:This is a simple and direct pattern, usually using the content ID as the identifier of the URL, for example/article-123.htmlIt is suitable for websites that do not have special requirements for URL structure, but have relatively weak readability and keyword relevance.
  2. Model naming pattern:This pattern combines the name of the model (such as article, product) to which the content belongs with the custom link name (or ID) of the content, for example/article/my-great-post.html. For websites that need to distinguish between different types of content, this pattern is more semantically meaningful.
  3. Category naming pattern 1 (ID-based):The URL contains the category ID and the custom link name (or ID) for the content, for example/news-category/latest-post.html.
  4. Category naming pattern 2 (Name-based):The URL contains a custom link name that includes the category and the custom link name (or ID), for example/tech/latest-gadget.htmlThese two classification modes emphasize the classification attribution of content, which helps users and search engines understand the hierarchy of the website.

These built-in rules are a good starting point, but in some cases, you may need to finely control every detail of the URL, and that's when you need to customize the static rules.

The third part: Customizing pseudo-static rules step by step

When the built-in rules cannot meet your SEO strategy or brand needs, AnQiCMS provides powerful custom static rules functionality.

1. Enter the custom mode

On the 'Function Management' 'SEO Rule' page, you will see the 'Custom Mode' option. Select it, and the detailed rule configuration area will appear below the page.

Here, you can set up six groups of pseudo-static rules, which correspond to different types of pages within the website: document details, document list, model home page, single page, tag list, and tag details.

2. Understand rule structure

Each custom rule follows规则名===规则值The format. On the left side of the equal sign is the AnQiCMS predefined page type, and on the right side is the structure of the URL you define for that type of page.

For example:archive===/{module}-{id}.html

  • archive: Represents the document detail page.
  • ===: Represents a delimiter.
  • /{module}-{id}.html: This is the URL structure you defined.

3. Core rule name and its purpose

The following are the main rule names you can use and customize:

  • archive: Used for definingDocument detail pagethe URL.
    • Example:archive===/{module}/{filename}.html(Will generate like/article/my-first-article.htmlthe URL)
  • category: Used for definingCategory list pagethe URL.
    • Example:category===/{module}/{catname}(-{page})(Will generate like/article/news/or/article/news-2/the URL)
  • archiveIndex: Used for definingModel homepagethe URL (i.e., all content lists under a certain content model).
    • Example:archiveIndex===/{module}.html(Will generate like/article.htmlthe URL)
  • page: Used for definingsingle pagethe URL (such as "About Us", "Contact Us", etc.).
    • Example:page===/{filename}.html(Will generate like/about-us.htmlthe URL)
  • tagIndex: Used for definingTag homepageWebsite (list page of all tags).
    • Example:tagIndex===/tags(-{page})(Will generate like/tags/or/tags-2/the URL)
  • tag: Used for definingTag detail pageWebsite (content list under a specific tag).
    • Example:tag===/tag/{id}(-{page})(Will generate like/tag/123/or/tag/123-2/the URL)

Please note that pagination information in the URL is usually(-{page})to indicate, the brackets are necessary, AnQiCMS will automatically generate or omit this part according to the actual page number.

4. Explanation of available variables.

When defining rule values, you can use the following variables, AnQiCMS will automatically replace them with the actual content:

  • {id}: The unique ID of the content, for example, article ID, category ID.
  • {filename}Custom link name of the content.This value needs to be manually entered in the 'Custom URL' field during the backend editing of documents, categories, or tags, or generated automatically by the system based on the title.It is the key to achieving SEO-friendly, and you can set it to an English word or pinyin highly relevant to the content topic.
  • {catname}:Custom link name for categories. Also set when editing categories in the background.
  • {catid}Unique ID of the category.
  • {module}:The URL alias of the model to which the content belongs. Defined in content model management.
  • {page}: Page number. This variable must be placed within parentheses, for example(-{page}).

5. How to set a custom link name({filename}/{catname})

This is a place where many users are easily confused.{filename}and{catname}This is not automatically extracted from the title by the system, but manually or automatically generated as an "alias" in the content management background.

  • Document (article/product)In the "Content Management" section, when editing a document, you will see a "Custom URL" field.By default, AnQiCMS will automatically generate a pinyin URL based on the document title you enter.how-to-customize-anqicms-urlThe content of this field is{filename}The value of the variable.
  • CategoryIn the "Content Management" section, when editing a category, there is also a "Custom URL" field. You can set it to the English name or pinyin of the category (for example:website-optimization-techniquesThe content of this field is{catname}The value of the variable.
  • TagUnder the "Content Management" section, when editing a label, there is also a "Custom URL" field, whose function is similar to that of documents and categories.

Ensure these custom link names are unique across the entire site to avoid URL conflicts.AnQiCMS saves data automatically and adds random numbers when necessary to ensure uniqueness.

6. Practical suggestions and precautions

  • Step by step test:After modifying the static rule, it is necessary to immediately access the website front-end and check whether the URLs of various page types (home page, article detail page, category list page, single page, etc.) are generated and accessible normally.
  • Backup rule:Before performing large-scale customization, it is recommended that you take a screenshot or copy the current pseudo-static rule configuration to prevent any unexpected occurrences.
  • Uniqueness:Customize link name ({filename}/{catname}The core of your SEO-friendly implementation, make sure they are descriptive and unique across the entire site.
  • 301 Redirect:If your website has already gone live and been indexed by search engines, changing the pseudo-static rules will cause the old URL to become invalid.At this time, you need to use the built-in "301 Redirect Management" feature of AnQiCMS to accurately redirect the old URL to the new URL to retain search engine weight and avoid traffic loss.This is a crucial step in changing the URL structure.

Related articles

In AnQiCMS, how to implement dynamic pagination on the article list page and control the number of items displayed per page?

Manage website content in Anqi CMS, the article list page is usually one of the main entry points for users to browse information.To provide a smoother user experience and optimize page loading performance, it is particularly important to implement dynamic pagination and flexible control over the number of items displayed per page.AnQi CMS provides powerful and easy-to-use template tags that allow us to easily implement these features.### Core Concept: The Foundation of Dynamic Pagination and Page Size Control In Anqi CMS, the implementation of dynamic pagination for article lists mainly relies on two core template tags: 1. **`archiveList`

2025-11-08

How to use AnQiCMS template tags to accurately control the display content of article detail pages?

The website is operational, and the article detail page is a key link for users to deeply interact with content and understand products or services.A well-designed, precise information presentation detail page, which can not only significantly improve user experience, but also effectively assist in SEO optimization.In such a flexible and efficient content management system as AnQiCMS, we can achieve fine-grained control over the content of article detail pages by ingeniously using its template tags.

2025-11-08

How does AnQiCMS handle image resource management and optimization?

In the daily operation of websites, images are not only an important part of the content, but also a key factor affecting website performance and user experience.Efficient image resource management and optimization, can significantly improve website loading speed, improve search engine rankings, and effectively protect the copyright of original content.AnQiCMS is a system born for content operation, which provides comprehensive and practical functions in image processing to help us easily meet these challenges.### A comprehensive centralized management of image resources AnQiCMS provides a centralized management platform for image resources

2025-11-08

How does AnQiCMS determine if a string or array contains a specific keyword and display content accordingly?

In website operation, we often need to dynamically adjust the display of the page based on the specific attributes or keywords of the content.For example, when the article title includes the words 'latest', we may want to add a prominent 'NEW' label; or when a product description mentions 'Free Shipping', an icon showing free shipping should be automatically displayed.AnQiCMS (AnQiCMS) provides powerful template functions and rich filters, making it easy to meet these needs.

2025-11-08

What content models does AnQiCMS support and how do they affect the front-end content display?

AnQiCMS is a major highlight in content management with its flexible content model support, which allows the website to structure and display information according to its unique business needs.Understanding how content models operate and how they affect the presentation of frontend content is the key to efficiently using AnQiCMS for website operations. ### AnQiCMS content model: Customized information blueprint The content model can be understood as the 'data structure blueprint' of various types of information on the website.

2025-11-08

How to retrieve and display all article lists under a specified category in AnQiCMS template?

When building a website with AnQiCMS, we often need to display article lists based on specific content categories, whether it is blog article categories, product categories, or news categories.This not only helps organize the content of the website, but also improves the user's browsing experience and the search engine's friendliness.AnQiCMS provides powerful and flexible template tags, making this requirement simple and intuitive.AnQiCMS's template system uses a syntax similar to the Django template engine, supported by Go language at the bottom level, ensuring the efficiency of template parsing.in the template file

2025-11-08

How to set the Title, Keywords, and Description of the homepage of AnQiCMS to improve search rankings?

In today's digital world, the visibility of a website is crucial for attracting potential customers.In order to improve a website's ranking in search engines, the Title (title), Keywords (keywords), and Description (description) on the homepage - which we often call TDK - are indispensable foundations.AnQiCMS (AnQiCMS) is a content management system designed specifically for small and medium-sized enterprises and content operation teams, fully understanding the importance of TDK and providing an intuitive and convenient way to easily optimize the search performance of your website

2025-11-08

How to enable Markdown editor in AnQiCMS and display mathematical formulas and flow charts correctly?

In AnQiCMS, content creation can not only rely on the traditional rich text editor, but the new version also introduces a Markdown editor, providing great convenience for users accustomed to Markdown syntax.Markdown is known for its concise and efficient features, making content writing more focused and quick.It is even more pleasing that with some simple configurations, we can also elegantly display complex mathematical formulas and intuitive flowcharts on the website.

2025-11-08