How to customize the URL display format of the article detail page in AnQiCMS?

Calendar 👁️ 80

In website operation, a clear and search engine-friendly URL (Uniform Resource Locator) is crucial for the visibility and user experience of the website.AnQiCMS (AnQiCMS) is well-versed in this, providing users with a flexible and powerful custom URL display format feature, allowing you to easily create personalized and SEO-friendly article detail page links according to your needs.

Flexible URL customization, starting from pseudo-statics

The core of AnQi CMS in URL management is its "pseudo-static and 301 redirection management" function.This feature can not only optimize the URL structure, but also effectively improve the SEO effect of the website.By using URL rewriting, the originally complex links with dynamic parameters can become concise and static, more favored by search engines, and also more convenient for users to remember and spread.

In Anqi CMS, you can choose from a variety of predefined static rules to meet different website needs.For example, the system is built-in with 'number pattern', 'model naming pattern', and two 'classification naming patterns', etc.These patterns usually meet the basic needs of most websites, allowing you to have a standardized URL structure without in-depth configuration.

Build personalized links: Detailed explanation of custom mode

If the preset mode cannot fully meet your refined needs, Anqi CMS also provides a "custom mode".This is the key to implementing URL height customization for the article detail page.To enable this feature, you need to go to the "Feature Management" module in the background, find the "Static Rule" option.

After entering the page for setting pseudo-static rules, select "Custom Mode". You will see that you can set rules for various page types, and the one directly related to the article detail page is "Document Details" (named the rule asarchiveEach rule is formed by规则名===规则值the form ofarchive===/article/{id}.html.

The power of custom rules lies in the support of multiple built-in variables, you can cleverly combine these variables to build a unique URL format:

  • {id}: represents the unique ID of the document.
  • {filename}This is the custom URL alias set when the document is edited.It is usually automatically generated based on the document title, but you can manually modify it to be more descriptive or use keywords.
  • {catname}This represents the custom URL alias of the document category. This alias can also be set and modified on the category editing page.
  • {catid}This represents the unique ID of the document category.
  • {module}It represents the model table name of the document (for examplearticleorproduct)
  • {page}It is used for pagination links, and should be placed within parentheses, like(/{page}).

Let us understand how these variables combine through some examples:

  • A concise ID link:archive===/{module}/{id}.html

    • For example:http://yourdomain.com/article/123.html
    • This format is concise and clear, but it doesn't help much with SEO keywords.
  • Category + document alias link:archive===/{catname}/{filename}.html

    • For example:http://yourdomain.com/news/anqicms-tutorial.html
    • This format combines categories and article keywords, which is very friendly to SEO and also more readable.
  • Model+CategoryID+AliasLink:archive===/{module}/{catid}/{filename}.html

    • For example:http://yourdomain.com/article/5/anqicms-features.html
    • This format includes more hierarchical information in the URL, suitable for websites with complex content classification.

{filename}and{catname}: The foundation of URL content.

While using{filename}and{catname}When defining variables, you need to pay special attention to their content settings. The values of these variables are not generated out of thin air, but are manually or automatically generated in the respective "Custom URL" field when you "add/edit document" and "add/edit category".

When editing a document, Anqi CMS will automatically generate a pinyin version of a custom URL based on the title of the document you enter as{filename}The default value. You can modify it as needed to better fit the SEO strategy, such as including English or pinyin of core keywords.Similarly, you can also customize while editing categories{catname}The value. Please remember that the custom URL (whether it is a document or a category) must be unique throughout the site, otherwise the system will automatically add random numbers at the end to ensure its uniqueness.

some important tips and **practice

  1. backup firstBefore modifying the pseudo-static rules, it is strongly recommended that you back up the current configuration or database. Incorrect rules may cause the website to be inaccessible, and having a backup can quickly restore it.
  2. uniqueness principle: Regardless of the document's{filename}or the category's{catname}ensure their uniqueness. Duplicate URLs not only affect user experience but also cause trouble for search engines.
  3. SEO-friendly considerations:
    • The URL should be as short and concise as possible, avoiding long parameters.
    • Contains keywords: in{filename}and{catname}Incorporating the core keywords of the article or category can help improve search rankings.
    • Use a hyphen: use a hyphen (-) instead of an underscore (_) to separate words, which is recommended by search engines.
    • Avoid deep hierarchies: A complex URL hierarchy may be不利于 search engine crawling.
  4. Change and 301 redirectIf your website has been launched and you are modifying the display format of the original article URL, be sure to use the '301 Redirect' feature.Redirect the old URL permanently to the new URL to avoid traffic loss and SEO weight decline caused by the failure of the old link.
  5. Clear cacheAfter modifying the static rules, if the page does not take effect immediately, please try to clear the system cache.

By using these powerful features provided by Anqi CMS, you can not only flexibly control the display format of the article detail page URL, but also lay a solid foundation for the website's SEO optimization, improving the overall operation efficiency and effect.


Frequently Asked Questions (FAQ)

Q1: I have modified the static rule, but the website page cannot be opened. What's the matter?A1: After modifying the static rule, the website cannot be opened. There are usually several reasons:

1.  **规则配置错误**:自定义规则中的变量拼写错误、格式不符合要求,或者规则之间存在冲突。请仔细检查你的规则配置。
2.  **未清除缓存**:部分更改可能需要清除系统缓存才能生效,尝试在后台找到“更新缓存”功能并执行。
3.  **服务器环境问题**:例如Nginx或Apache的配置未正确加载安企CMS的伪静态规则。在宝塔面板等环境下,需要确保伪静态规则已正确配置到Web服务器中。

Q2:{filename}and{catname}How are the contents of these variables determined, can I customize them?A2: Of course, you can customize it.{filename}The value comes from the "Custom URL" field you enter when adding or editing an article.{catname}The value comes from the 'Custom URL' field you entered when adding or editing a category.AnQi CMS will automatically generate pinyin as the default value based on the article title or category name, but you can manually modify it to a more appropriate string according to SEO requirements, such as including keywords in English or pinyin abbreviations, but make sure it is unique throughout the site.

Q3: What impact will adjusting the URL format of the article detail page have on the website's SEO?A3: Adjusting URL format has a significant impact on SEO.A concise, meaningful URL with keywords is easier for search engines to understand and index, which may improve search rankings.At the same time, a friendly URL can also improve user click-through rate and experience.However, if the website has been launched and there are old URLs indexed, it is necessary to set up a 301 permanent redirect after changing the URL, to avoid search engine weight loss and user access failure.

Related articles

What cleaning solutions does the keyword replacement function of AnQi CMS provide for outdated keywords that are no longer in use?

With the continuous growth of website content and the constant evolution of market trends, keywords that once brought traffic and exposure to the website may sometimes become outdated and no longer popular, and even possibly have a negative impact on the overall image of the website.Continuous content optimization not only includes continuously creating new content, but also离不开can't do withoutthe maintenance and cleaning of existing content.Faced with old keywords that are no longer used, Anqi CMS provides a series of efficient cleaning solutions aimed at helping us maintain the accuracy, timeliness, and SEO performance of website content.

2025-11-08

Can the keyword replacement function of AnQi CMS synchronize or integrate with the data of third-party SEO tools?

In today's highly competitive online environment, keywords are the core of content operation and SEO optimization.Many website operators hope that their CMS systems can have an efficient keyword management and replacement mechanism, and can be linked with external professional SEO tools to better grasp and optimize the SEO performance of their websites.Whether the keyword replacement function of Anqi CMS can synchronize or integrate with the data of third-party SEO tools, this is indeed a very worthy topic of discussion.

2025-11-08

How to use 'empty' to replace keywords in Anqi CMS and delete keywords?

The continuous optimization of website content is the key to maintaining its competitiveness.With market changes, brand upgrades, or SEO strategy adjustments, we often need to update some words on the website, or even completely delete those that are no longer applicable or may have a negative impact.Manually search and modify these contents one by one, which is undoubtedly a time-consuming and labor-intensive task for websites with a large number of pages.AnQiCMS provides a powerful feature called "Full Site Content Replacement" that helps users efficiently manage and update keywords or links on their websites.

2025-11-08

The keyword replacement function of Anqi CMS, does it support operations on non-article content such as product models, single pages, etc.

AnQiCMS (AnQiCMS) with its efficient and flexible features, has brought many conveniences to us in content management.Among them, the "Full Site Content Replacement" feature sounds very practical, it allows us to update keywords or links on the website in batches with one click, which is crucial for the SEO optimization of the website and the unification of brand information.However, when using this feature, many friends may be curious like me: just how wide can this 'whole site' cover?

2025-11-08

How to display the latest article list on the homepage using AnQiCMS template tags?

In website operation, displaying the latest article list on the homepage is a commonly used method to enhance user engagement and website activity.AnQiCMS provides a powerful and flexible template tag system that allows you to easily implement this feature on the homepage without complex programming knowledge.This article will guide you step by step to configure and refresh the content of your website's homepage. ### Learn about AnQiCMS template system AnQiCMS uses a syntax similar to the Django template engine, developed using Go language, with efficient and secure features.

2025-11-08

How to independently display the content of articles in different sites in AnQiCMS multi-site management?

## AnQiCMS multi-site management: How to ensure the independent display of article content on different sites?In website operation, especially when the business involves multiple brands, product lines, or requires customized content for different markets, multi-site management becomes a key capability.AnQiCMS is a content management system designed specifically for small and medium-sized enterprises and content operation teams, with powerful multi-site management functions that can help us efficiently build and maintain multiple independent sites while ensuring that the content of each site can be presented independently and accurately.

2025-11-08

How to enable Markdown rendering and correctly display mathematical formulas in article content?

AnQi CMS article content: Turn on Markdown rendering, easily handle mathematical formulas and flowcharts AnQi CMS is an efficient, customizable and easy-to-expand content management system, committed to providing users with a convenient content publishing and management experience.In daily content creation, we often encounter scenarios where it is necessary to insert code, tables, even complex mathematical formulas and flowcharts.Traditional rich text editors often fall short when handling this content, but Markdown, with its concise syntax and powerful expressiveness, has become the preferred choice for many content creators.It is fortunate that

2025-11-08

How to implement differentiated display of content for PC and mobile terminals in AnQiCMS templates?

In today's internet environment, providing a high-quality cross-device browsing experience is the key to the success of website operations, whether it is a corporate website, e-commerce platform, or personal blog.AnQiCMS (AnQi CMS) has fully considered this requirement in template design, providing users with flexible and diverse solutions to achieve differentiated display of content on PC and mobile endpoints.This is not just about adapting the interface layout, but also about how to present the most suitable content for users based on device characteristics.Next, we will delve into how the AnQiCMS template cleverly achieves this goal.

2025-11-08