AnQiCMS provides flexible and powerful pseudo-static URL structure settings in website operation, which is crucial for the SEO performance and user visit experience of the website.The URL is called pseudo-static, as the name suggests, it makes the links of dynamically generated pages look as simple and regular as static file paths, thus making it easier for search engines to crawl and for users to understand.

Why are pseudo-static URLs so important?

Before delving into how to set up pseudo-statics in AnQiCMS, let's first briefly review why it holds such an important position in website operations:

  1. Improve search engine optimization (SEO)English: The search engine spider prefers URLs that are structured clearly and semantically explicit.The pseudo-static URL usually contains meaningful keywords, rather than a string of unordered parameters, which helps search engines better understand the page content, thereby improving the inclusion and ranking of the website.
  2. Optimizing user experienceEnglish: A concise, readable URL is not only convenient for users to remember and share, but also can increase users' trust in the website to some extent.When users see a clean URL, they are more likely to click and browse.
  3. Enhance link stability:The dynamic URL may become invalid due to parameter changes.The pseudo-static URL once set, will usually remain relatively stable, reducing the generation of dead links, which is particularly beneficial for websites with long-term operation.

AnQiCMS knows these advantages, therefore static as a core feature in system design, providing users with a variety of settings from convenient selection to deep customization.

AnQiCMS pseudo-static core implementation mechanism

AnQiCMS combines backend routing rules with frontend page rendering to achieve pseudo-static.In simple terms, when a user accesses a pseudo-static URL, the website server (such as Nginx, Apache) will forward this request to the AnQiCMS application.AnQiCMS again parses the user's intended content to be accessed according to the internal pseudo-static rules (such as article ID, category ID), then retrieves the corresponding data from the database and renders the page, and finally returns it to the user.

Two setting modes: quick start and deep customization

AnQiCMS provides two types of pseudo-static setting modes for users to meet different needs:

1. Built-in pseudo-static rules: a convenient choice

For most users, the four built-in pseudo-static rules provided by AnQiCMS are sufficient to meet daily needs. They cover common URL structures for Chinese and English sites, allowing you to have SEO-friendly links without complex configuration:

  • Number Pattern:The content ID is used as the unique identifier for the URL. For example:/article/123.html.
  • Model naming pattern:Include the alias of the content model (such as article, product) in the URL for better semantics. For example:/article/seo-guide.html.
  • Category Naming Pattern 1In URLs, category aliases are often included, and it is commonly used in Chinese sites. For example:/news/industry-trends-123.html.
  • Classification naming pattern 2Similarly includes category aliases, but may use different delimiters or structures, more suitable for English sites. For example:/category/news/article-title.html.

These built-in rules can be directly selected and enabled in the 'Function Management' -> 'Rewrite Rules' of AnQiCMS background, which is very suitable for users who want to quickly set up a website.

2. Custom rewrite rules: Take control of everything

If you have specific SEO strategies, brand requirements, or need to maintain consistency with the old website's URLs, AnQiCMS's custom rewrite rule feature will provide ultimate flexibility.This belongs to the advanced mode, and it needs to be particularly meticulous during configuration to avoid the page from being inaccessible.

Custom rewrite rules can be set for the following six page types:

  • Document details page (archive)Such as articles, product detail pages.
  • Document list page (category)Such as category list pages.
  • Model homepage (archiveIndex):如文章首页、产品首页。
  • Single Page (page):如“About Us”、“Contact Us”等独立页面。
  • 标签列表页 (tagIndex):展示所有标签的页面。
  • Tag detail page (tag):Display the page of content under a specific tag.

Each custom rule follows规则名===规则值format. For example,archive===/{module}-{filename}.html.

In规则值, you can flexibly use the variables provided by AnQiCMS to construct your URL:

  • {id}:Content's unique ID (such as article ID, category ID).
  • {filename}:Content's custom URL alias.
  • {catname}The custom URL alias of the category.
  • {catid}The unique ID of the category.
  • {module}:Content model (such asarticle/product) URL alias.
  • {page}Page number.Please note: Pagination page number variable{page}必须用小括号()包裹起来,例如(-{page}),表示分页是可选的,仅在有分页时显示。

自定义规则示例:

”`conf

Document Details Page: Model Alias/Content Alias.html

archive===/{module}/{filename}.html

Document list page: Category alias/ (optional pagination)