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.