Build a clear, SEO-friendly URL structure in AnQiCMS is a very important part of website operation.By reasonably configuring the pseudo-static rules and cleverly integrating classification and alias, 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.html,you 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 that includes 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.AnQiCMS's pseudo-static feature is born for this.
The unique feature of AnQiCMS static URL rewriting
AnQiCMS's pseudo-static feature is not limited to simple ID conversion, it allows us to deeply customize the URL, such as the alias of content categories (catname)、the alias of content models (module),even to the custom URL of specific contentfilename,usually also called alias or friendly URL, is 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.
Visit the rule settings for pseudo-static accessLog in to the AnQiCMS backend, find 'Function Management' in the left menu, and click on 'Pseudo-static Rules'.
Select the custom modeEnter the configuration interface for pseudo-static rules, where you may see several preset rules built into the system, such as "number pattern" and "model naming pattern".These built-in rules are sufficient in many cases, but in order to achieve a complex URL structure that includes categories and model aliases, we need to select 'custom mode'.
Custom mode provides six sets of rule configurations, each corresponding to different types of pages on the website: document detail pages, document list pages, model homepage, single pages, tag list pages, and tag detail pages. Each set of rules consists of
规则名===规则值The form is composed of.Understanding the available variables in pseudo-static rulesIn 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 set for articles, single pages, or tags. This is the key to implementing a friendly URL structure.{catname}:represents the 'Custom URL' (category alias) of the classification.{catid}:represents the unique numeric ID of the category.{module}:represents the 'URL alias' of the content model.{page}English for pagination, usually placed within parentheses, such as(-{page})indicating that this is an optional pagination section.
An example of building a URL rule for a URL that includes categories and model aliasesWith these variables, we can flexibly combine to build the URL structure that meets our needs.
Document details page (
archive):If you want the URL structure of the article detail page to be/{模型别名}/{分类别名}/{文章别名}.html,then 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 be displayed only when there is pagination, 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