How to customize the URL static rules of the article detail page in AnQiCMS?

Calendar 👁️ 73

In website operation, a clear and friendly URL structure is crucial for search engine optimization (SEO) and user experience.AnQiCMS provides flexible pseudo-static (URL rewrite) functionality, allowing users to customize the URL format of article detail pages according to their needs.This article will introduce how to customize the URL static rules of the article detail page in AnQiCMS.

Why do you need to customize the URL static rules?

Static URLs (or pseudo-static URLs) have many advantages over dynamic URLs (containing question marks, parameters, etc.)They are usually shorter, more readable, and can make the page content clear to users.For search engines, static URLs are also easier to crawl and index, and keywords appearing in the URL can help improve rankings.AnQiCMS is well-versed in this, therefore it has made pseudo-static management one of its core features to help users optimize their website's SEO performance.

AnQiCMS overview of pseudo-static rules

In the AnQiCMS background, you can find the 'Function Management' menu under the 'Static Rule' option.After entering, the system will display the current website's URL rule settings.AnQiCMS has built-in several commonly used pseudo-static rules such as numeric patterns, model naming patterns, and category naming patterns, etc., which can be directly selected to meet the basic needs of different types of websites.

However, for users who pursue personalization or have specific SEO strategies, built-in rules may not be completely satisfactory.At this time, choosing 'Custom Mode' becomes the key.The custom mode allows us to define the URL structure separately for different types of pages, including article detail pages, article list pages, model home pages, single pages, tag list pages, and tag detail pages.

Custom URL pseudo-static rules for article detail pages

The URL rule for article detail pages is namedarchiveRule name to control. In custom mode, you will see something similararchive===/{module}/{id}.htmlSuch default rules.This indicates that the URL of the article detail page will be composed of the model alias and article ID.But AnQiCMS provides a rich set of variables, allowing you to build URLs that meet your expectations.

Can be used on the article detail pagearchiveCommon variables of the rule include:

  • {id}The unique ID of the article, usually a number. This is the most common component, ensuring the uniqueness of the URL.
  • {filename}The custom link name of the article.This is a very powerful variable because it allows you to manually set the article URL alias during article editing.anqicms-rewrite-settingsSuch that this readable alias will appear in the URL. It should be noted that when the "Custom URL" field of the article is empty, the system will automatically generate pinyin according to the title of the article as the default{filename}But for SEO and standardization, it is recommended to manually set it and ensure its uniqueness throughout the site.
  • {catname}The custom link name of the category to which the article belongs. If you want the category information to be included in the URL, you can introduce this variable.
  • {catid}The ID of the category to which the article belongs.
  • {module}: The URL alias of the content model to which the article belongs. This helps to distinguish articles under different content models, for example/news/represents the news model,/product/represents the product model.

rule combination example

Here are some common rules and explanations for article detail page URLs:

  1. /article/{id}.htmlThis is the simplest numeric ID pattern. For example:http://yourdomain.com/article/123.html.
  2. /{module}/{filename}.htmlThis rule combines the alias of the model to which the article belongs with the custom link name of the article. For example, if the model alias isnews, the custom link name of the article isanqicms-update, then the URL may be:http://yourdomain.com/news/anqicms-update.htmlThis pattern is very friendly to SEO because the URL contains readable keywords.
  3. /{module}/{catname}/{filename}.htmlThis rule adds a category custom link name between the model alias and the article custom link name, forming a URL with more levels. For example:http://yourdomain.com/news/industry-insights/anqicms-update.html. This helps users and search engines understand the attribution of the article.
  4. /{module}/{catid}-{filename}.htmlIf you want to reflect the category ID in the URL instead of the category name (the category name may be too long or not suitable for direct display in the URL), you can use this pattern. For example:http://yourdomain.com/news/15-anqicms-update.html.

When configuring rules, please pay attentionRule valueFormat: It consists of规则名===规则值For examplearchive===/path/to/your/article.html.

Configuration steps

Set the URL rewrite rule for the article detail page in the AnQiCMS backend, the operation process is as follows:

  1. Log in to the backendUse the administrator account to log in to the AnQiCMS backend management system.
  2. Enter the pseudo-static rule management: Find "Function Management" in the left navigation bar, expand it and select "Static Rules".
  3. Select custom modeOn the page of static rule, find "Custom Mode" and click to select.
  4. EditarchiveRuleOn the custom rule list, find witharchive===The starting rule item. Modify the content after the equal sign according to the URL structure you choose. Please refer to the above rule combination example and fill in carefully. For example, if you want to use/{module}/{filename}.htmlFormat it and change this itemarchive==={module}/{filename}.html.
  5. Save configuration: After the modification is completed, be sure to click the 'Save' button at the bottom of the page to make the new rule effective.
  6. Clear cache and testAfter saving, it is recommended to clear the website cache (usually there is an 'Update Cache' button at the top or side of the background), then visit the article detail page on the website front end, check if the new URL structure has taken effect, and ensure that the page can be accessed normally.

If you have used in the rules{filename}Variable, so when publishing or editing articles, please be sure to fill in a concise, keyword-containing, and unique English alias in the "Custom URL" field in the article editing interface. This will directly affect the URL in{filename}The ultimate content.

Points to note

  • Testing is the key.Any modification to the URL rules may affect website access and SEO.After each modification, be sure to thoroughly test the detail page URLs under different articles and categories to ensure they are normal and the content is displayed correctly.
  • 301 RedirectIf your website has already gone live and been indexed by search engines, changing the URL structure will cause the original URL to become invalid.In order to avoid traffic loss and SEO negative impact, it is strongly recommended to use AnQiCMS built-in 301 redirect function after changing the URL rules, to permanently redirect the old URL to the new URL.This can inform search engines that the page has been migrated, ensuring the passing of weight.
  • Uniqueness.: Use.{filename}It is crucial to ensure the uniqueness of the item across the entire site. If there is a duplicate, the system will automatically add a numerical suffix to distinguish it, but this may not meet your aesthetic or SEO requirements.
  • SEO-friendlyWhen customizing URLs, try to make them short, include core keywords, and have clear levels, avoiding long parameters and unnecessary special symbols.

By reasonably customizing the URL static rules of the article detail page, AnQiCMS can help your website make a new step forward in content management and SEO optimization, providing users with a better browsing experience and a more friendly indexing environment for search engines.


Frequently Asked Questions (FAQ)

Q1: I modified the pseudo-static rules and saved, but the URL of the article detail page is still the same, why is that?A1: This may be caused by various reasons.First, make sure you clicked the "Save" button.Secondly, after modifying the pseudo-static rules, it is usually necessary to clear the website cache to make the new rules take effect on the front end. Please try to perform the "update cache" operation in the background.Additionally, if your website is deployed on a web server using Nginx or Apache and has configured reverse proxy, you may also need to check if the server configuration is compatible with AnQiCMS's pseudo-static rules, or if you need to restart the web service.

Q2: Use{filename}When is a variable, what is the role of the 'Custom URL' field in the article editing page? How should I fill it out?A2: The 'Custom URL' field is for

Related articles

How to display the publish time and update time of articles in AnQiCMS templates?

Understand the publication and update time of an article, which not only helps readers judge the timeliness of the content and avoid outdated information, but also is an important consideration for search engine optimization (SEO).AnQiCMS as an efficient content management system provides flexible template functions, allowing you to easily display these key time information on your website.

2025-11-08

How does AnQiCMS implement intelligent recommendation and display of related articles?

In content operation, effectively recommending relevant articles to readers can not only significantly increase user stay time and page views, but also indirectly promote search engines to crawl and allocate weights to the website's content through internal link optimization.AnQi CMS is well-versed in this, providing a smart and flexible mechanism to help users easily implement the recommendation and display of related articles.How does AnQiCMS implement intelligent article recommendation?

2025-11-08

How to display the links and titles of the previous and next articles on the article detail page?

When a reader visits an article of interest, they often hope to browse related or continuous content seamlessly, rather than returning to the list page to search again.Provide navigation links to "Previous" and "Next" articles on the article detail page of the website, which is an effective way to enhance this reading experience and increase user stickiness.It can not only guide users to explore the website content in depth, but also optimize the internal link structure of the website to a certain extent, making it friendly to search engines.AnQiCMS (AnQiCMS) is a powerful content management system that fully considers the needs of content operation

2025-11-08

How to call and display custom field content in the article detail page of AnQiCMS?

In AnQiCMS, managing and displaying content, custom fields play a crucial role, enabling our website to flexibly carry various unique information, not limited to common attributes such as titles and content.Whether it is to add detailed technical parameters for product detail pages or to supplement author biographies and external reference links for articles, custom fields can provide strong support.Understand how to call and display these custom fields on the article detail page, which will greatly enhance the richness and customization of the website content. AnQiCMS

2025-11-08

How to set the page title (Title) in AnQiCMS template and automatically append the website name?

In website operation, the page title (Title) is a crucial element, it not only directly affects the willingness of users to click in the search engine results page (SERP), but is also a key indicator for search engines to judge the relevance of page content.A clear, standardized title that includes the website brand name, which can effectively enhance the professionalism and brand recognition of the website.AnQiCMS provides a flexible and powerful mechanism for setting website titles, allowing you to easily control the title of each page and automatically attach the website name

2025-11-08

How does AnQiCMS dynamically display the page keywords (Keywords) and description (Description)?

AnQiCMS has always been committed to providing flexible and powerful functions in content management and SEO optimization, with the dynamic display of page keywords (Keywords) and descriptions (Description) being one of its core highlights.For any website that hopes to perform well in search engines, precise TDK (Title, Description, Keywords) configuration is indispensable.

2025-11-08

How to implement the display of Canonical normative links in AnQiCMS templates to optimize SEO?

In the field of website operation and Search Engine Optimization (SEO), Canonical (standard) links are a very important concept.It can help search engines identify and handle duplicate content issues on websites, ensuring that the authority and ranking of the website are not affected by scattered content.In AnQiCMS (AnQi CMS), implementing the display of canonical links is a key step in optimizing website SEO, and through its flexible template system, this process becomes intuitive and efficient.

2025-11-08

What URL static mode does AnQiCMS support to optimize search engine crawling?

In today's internet world, an excellent website not only needs to provide high-quality content, but also needs to make it easy for users and search engines to discover this content.The importance of the structure of the URL (website address) is self-evident.A clean, meaningful URL not only improves user experience, but is also a key factor in search engine optimization (SEO).AnQiCMS (AnQiCMS) knows this and therefore took full consideration of the flexibility of pseudo-static URLs from the beginning, aiming to help users build websites friendly to search engines.Why is URL rewriting so important for SEO

2025-11-08