How to configure URL rewrite rules in Anqi CMS to optimize search engine crawling?

Calendar 👁️ 70

In website operation, Search Engine Optimization (SEO) plays a vital role, and a friendly URL structure is a key factor in improving a website's performance in search engines.A clear and meaningful URL can not only help search engines better understand the content of the page, but also allow visitors to see the theme of the page at a glance, enhancing the user experience.Traditional dynamic URLs often contain parameters that are difficult to understand, which is not friendly to SEO and users. 幸运的是,SafeCMS provides powerful pseudo-static rule configuration features, allowing you to easily optimize your website's URL structure.

Understanding the importance of URL rewriting

A pseudo-static URL, as the name implies, it looks like a static HTML file, but it is actually generated dynamically by the server. For example, a dynamic URL might beexample.com/article.php?id=123&category=newsAfter pseudo-static, it may becomeexample.com/news/article-123.htmlOrexample.com/news/article-anqicms.html.

The benefits brought by this change are obvious:

  • Improve the efficiency of search engine crawling:Search engine spiders prefer to crawl static or pseudo-static URLs with clear structure and path.
  • Improve keyword ranking:Including keywords in the URL helps search engines understand the page topic and may improve the ranking of relevant keywords.
  • Enhance user experience:A concise and readable URL is more convenient for users to remember and share, and it is also easier to judge the content of the page.
  • Increase click-through rate:In search results, a clear URL is more likely to attract users to click.

AnQi CMS understands the importance of static URLs for content operations and therefore has incorporated it as one of the core features from the initial system design, committed to helping small and medium-sized enterprises and content operation teams efficiently carry out SEO optimization.

Overview of static functionality in AnQi CMS

AnQi CMS provides users with two ways to configure static rule: one isBuilt-in preset rulesenabling you to quickly apply common URL patterns; secondlyhighly flexible custom rulesenabling you to design a unique URL structure according to specific needs.

No matter if you are a novice operator or a senior SEO expert, you can find a static configuration scheme suitable for yourself in Anqi CMS.

Built-in static rules, ready to use

If you want to enable pseudo-static quickly, or have no particularly complex requirements for URL structure, the four built-in pseudo-static rules provided by Anqi CMS will be your ideal choice:

  1. Numeric mode:This is a simple and intuitive pattern, the details of the document, document list, single page, tags, etc. will all use their respective IDs as the basis for generating the URL. For example,/article-123.htmlThis pattern is especially suitable for Chinese websites, with a concise and clear structure.
  2. Model naming pattern:In this mode, the URL will include the English alias of the model (such as articles, products). For example,/article/anqicms-tutorial.htmlThis is very useful for creating English websites or for websites that want to distinguish content models through URLs.
  3. Category naming pattern 1:The URL will include the alias of the category. For example,/news/anqicms-update.htmlThis pattern is also common on Chinese websites, which can clearly show the ownership of the content.
  4. Category naming pattern 2:It is also based on category naming, but it may be slightly different in structure from pattern 1, providing more choices. It is also often used on English sites.

To use these built-in rules, you just need to enter the Anqi CMS backend management interface, find the "Function Management" in the left menu, and then click on "Static Rule Setting".Here, you can directly select one of the built-in rules and save.The system will automatically generate a URL that conforms to the rule.

Custom static rules, flexible control.

If you have a deeper understanding of website structure and SEO, or want to create unique URLs for specific types of pages, then the Anqi CMS custom pseudo-static rules will be your weapon. It allows you to define pseudo-static rules separately for the six main page types of your website:

  • Document Details (archive):Such as articles, product detail pages.
  • Document List (category):Such as article lists, product lists pages.
  • Model homepage (archiveIndex):Such as the homepage of all articles or all products.
  • Single page (page):such as "About Us", "Contact Us", and other independent pages.
  • Tag list (tagIndex):List page of all tags.
  • Tag details (tag):Single tag detail page.

Each custom rule follows规则名===规则值Format. In rule values, you can combine multiple variables provided by Anqin CMS to construct URLs:

  • {id}Data ID, such as document ID, category ID.
  • {filename}This is a custom link name for data. It is usually manually entered when publishing documents, creating single pages, or tags, or generated by the system according to the title in pinyin.
  • {catname}Custom link name of category. It is the English alias or pinyin automatically generated when you create the category.
  • {catid}: Category ID.
  • {module}: Model table name, such as "article" or "product".
  • {page}Page number.Please pay special attention, the variable for pagination page number needs to be enclosed in parentheses, for example,(/{page})When the page does not have pagination, the page number part of the URL will not be displayed, keeping it concise.

For example, you may want the URL of the article detail page to include the model name, article ID, and end with.htmlThen you can configure it like this:archive===/{module}-{id}.html

If you want the URL of the article list page to include the category name and support pagination, you can configure it like this:category===/{catname}(/{page})

When you configure{filename}or{catname}Remember when customizing this kind of link name variable:

  • AnQi CMS will automatically generate the pinyin as the default custom URL based on the Chinese title you enter.
  • You can manually modify these custom URLs, but you must ensure that they are unique across the entire site. Otherwise, the system will automatically add random numbers at the end to ensure uniqueness.
  • It is best to use letters, numbers, and underscores for custom URLs entered manually, to avoid special characters and spaces, ensuring the friendliness of the URL.

Configure custom rules and don't forget to click save, andEnsure your website is fully testedMake sure all links can be accessed normally.

Brief guidance on configuration steps

  1. Enter the backend:Log in to your AnQi CMS backend management interface.
  2. Navigate to Function Management:Find and click on "Function Management" in the left menu.
  3. Select the static rule:On the feature management page, click the 'Static rules' option.
  4. Select or customize:
    • Select built-in rules:Directly select the pattern you need from the preset rules and then click save.
    • Custom rules:Select "Custom mode" then in the input box of the corresponding page type (such as "Document Details", "Document List", etc.), follow规则名===规则值Enter your pseudo-static rules. Please refer to the variables and examples mentioned above.
  5. Save and test:Click Save after filling in.It is a very important step to: After saving, be sure to carefully check all pages of the website (including article details, lists, single pages, tag pages, etc.), to ensure that the URL has been generated according to your configuration and can be accessed normally.

Optimization Practice Suggestions

  • Keep the URL concise:Try to shorten the URL length as much as possible, remove unnecessary words.
  • The URL contains keywords:Use core keywords related to the page content in the URL, but avoid stacking.
  • Use hyphens-Word separation:The hyphen is the recommended word separator for URLs by search engines, better than the underscore_More popular.
  • Manage your custom URL ({filename}and{catname}):Ensure these aliases are descriptive, concise, and unique.If the content title changes, consider whether you need to update the custom URL, but also pay attention to the configuration of 301 redirects to avoid the failure of the old URL.
  • Make good use of 301 redirects:If your URL structure is

Related articles

How to display a custom SEO title on the article detail page instead of the article title?

In content operation, setting the title of the website article detail page is a key link.We often encounter such situations: the content title of the article itself needs to be eye-catching and creative, in order to attract readers' clicks;And the page title required for search engine optimization (SEO) (i.e., the content of the `<title>` tag displayed on the browser tab), is more focused on keyword layout, length control, and search engine friendliness.In AnQiCMS, you can fully flexibly manage these two different titles to ensure both user experience and SEO effectiveness.

2025-11-07

How to use the `length` filter to get the length of a string, array, or key-value pair for display or judgment

In website content operation, we often encounter scenarios where we need to obtain or judge the length of data.For example, displaying the number of words in an article, the number of items in a list, or deciding whether to display an element based on the content length.AnQiCMS's template engine provides a series of practical filters to help us meet these needs, among which the `length` and `length_is` filters are the best.They can help us easily achieve these functions, making the dynamic display and interaction logic of the website more flexible.

2025-11-07

How to use the `contain` filter in AnQiCMS template to determine whether a string or an array contains a specific keyword?

During the process of building a website on AnQiCMS, flexibly displaying information according to the characteristics of the content is the key to improving user experience and operational efficiency.To achieve this, the system has built-in many practical template filters, among which the `contain` filter is a powerful tool for determining whether the content contains specific keywords.It can help you match content directly at the template level without modifying the backend code, thereby making your website content display more intelligent and personalized.

2025-11-07

How to retrieve and display a list of documents under a specified Tag, and support pagination?

In website content management, categorizing and displaying documents according to their tags (Tags) is an important strategy to enhance user experience and content discoverability.AnQiCMS provides a set of intuitive and powerful template tags that help us easily achieve this goal, while also supporting flexible pagination functionality, even when faced with massive amounts of content, it can maintain the page's cleanliness and loading speed.

2025-11-07

How to display the multi-language content switch button on the website front end?

On AnQiCMS, it is crucial to display a multilingual content switch button on the website front-end to expand the global user base and enhance the user experience.AnQiCMS with its powerful multilingual support and flexible template mechanism makes implementing this feature intuitive and efficient. ### AnQiCMS multilingual mechanism overview AnQiCMS considered the needs of global content publishing from the outset.Its multilingual support is centered around the "multi-site management" feature.This means that you can create different sites to represent different language versions. For example

2025-11-07

Where is the TDK (Title, Keywords, Description) information of the home page set and displayed?

The TDK (Title, Keywords, Description) information on the homepage is crucial for the performance of the website in search engines.It is not only the key for search engines to understand the core content of a website, but also an important basis for users to decide whether to click on a website in the search results page.AnQi CMS is an efficient content management system that provides an intuitive and convenient TDK management function, allowing us to easily optimize the visibility of the website homepage in search engines.

2025-11-07

How to customize the template layout of article, product, and category pages?

In AnQi CMS, flexibly customizing the page template layout is a key step to enhancing website personalization and user experience.Whether it is an article, product detail page, or category list page, AnQi CMS provides powerful and intuitive tools to allow you to create unique and stylish pages without delving into programming.Let's explore how to bring your design concept to life in Anqi CMS.

2025-11-07

How to get and display the thumbnail or cover image of the article in the template?

The Anqi CMS has always been highly praised for its flexibility in content display, where images act as the core elements to attract users and convey information. How to efficiently and accurately obtain and display the thumbnail or cover image of the article in the template is a focus for many website operators.This article will thoroughly explain the Anqi CMS template mechanism and guide you step by step to master the skills of image calls.How does AnQi CMS intelligently handle images

2025-11-07