Building a clear, search engine-friendly URL structure in AnQiCMS is a very important aspect of website operation.By reasonably configuring the pseudo-static rules and ingeniously integrating categories and model aliases, it can not only improve the user experience but also significantly optimize the website's SEO performance.AnQiCMS as a high-performance content management system provides flexible pseudo-static features, allowing us to easily achieve these goals.
The importance of optimizing URL structure
Imagine you visit a website and see this kind of link:example.com/article.php?category_id=1&article_id=123Don't you think it's a bit long and hard to understand? But if the link is like this:example.com/news/industry-trends/anqicms-update.htmlYou can tell at a glance that this is an article about 'news' under 'industry trends' with the title 'AnQiCMS update'.
This is the charm of optimizing URL structure. A clear, concise URL with keywords, not only makes it easier for users to remember and share, but also helps search engines better understand the content of the page, thereby improving the crawling efficiency and ranking of the website.The pseudo-static feature of AnQiCMS is born for this.
The unique feature of AnQiCMS static page generation
The AnQiCMS static URL feature is not limited to simple ID conversion, it allows us to deeply customize URLs, including the aliases of content categories (catname), and the aliases of content models (module),even to the custom URL of specific content(filenameThese, also known as aliases or friendly URLs, are integrated into the final URL structure.This is undoubtedly a very practical feature for those who want to build highly customized, SEO-friendly websites.
Detailed steps to configure pseudo-static rules
To start the configuration, we need to enter the AnQiCMS backend management interface.
Access the伪静态规则设置Log in to the AnQiCMS backend, find "Function Management" in the left menu, and click on "伪静态规则" there.
Select custom modeAfter entering the static rule configuration interface, you may see several built-in preset rules, such as 'numeric mode', 'model naming mode', and so on.These built-in rules are usually sufficient in many cases, but in order to implement a complex URL structure that includes categories and model aliases, we need to select the "custom mode".
The custom mode provides six sets of rule configurations, each corresponding to different types of pages on the website: document detail page, document list page, model homepage, single page, tag list page, and tag detail page. Each set of rules consists of
规则名===规则值in the form of.Understand the available variables in pseudo-static ruleIn the custom rule values, there are some very important variable symbols, which are the key to building flexible URLs:
{id}This represents the unique numeric ID of the content, which is the most common identifier.{filename}This variable is used to call the 'custom URL' (alias) you have set for articles, single pages, or tags. This is the key to achieving a friendly URL structure.{catname}: Represents the 'Custom URL' (category alias) of the category.{catid}: Represents the unique numeric ID of the category.{module}: Represents the 'URL alias' of the content model.{page}: Used for pagination, usually placed within parentheses, such as(-{page}), indicating that this is an optional pagination section.
Example of constructing a URL rule that includes category and model aliasesWith these variables, we can flexibly combine and build URL structures that meet our needs.
Document details page (
archive):If you want the URL structure of the article detail page to be/{模型别名}/{分类别名}/{文章别名}.htmlThen you can configure in the "Document Details" rule (archive) as follows:archive===/{module}/{catname}/{filename}.htmlDocument list page (
category):Similarly, for the category list page (category), if you want the URL to be/{模型别名}/{分类别名}(-{page}).html(Considering pagination), it can be configured as:category===/{module}/{catname}(-{page}).htmlPlease note the pagination section(-{page})Placed in parentheses, it indicates that it is optional and will only be displayed when pagination is present, for exampleexample.com/news/industry-trends/page-2.html.Model homepage (
archiveIndex):The model homepage usually represents an overview of a content model, such as the article homepage, product homepage. You can