In website operation, a URL structure that is friendly to both users and search engines is crucial.It not only allows visitors to understand the page content at a glance, but also facilitates search engines in capturing and understanding your website, which directly affects the SEO performance and user experience of your website.AnQiCMS (AnQiCMS) understands this point, therefore it built powerful pseudo-static features to allow you to easily customize your website's URL.

Next, we will explore how to correctly configure the pseudo-static rules in AnQiCMS to generate those beautiful and practical URLs.

Why are Static URLs so Important?

Imagine if your website article links looked like this: yourdomain.com/index.php?mod=article&id=123&catid=456This looks long-winded, difficult to remember, and cannot directly tell the user what this page is about.It is more important that search engines may encounter difficulties in crawling URLs with too many dynamic parameters, which may affect the inclusion and ranking of your website.

While pseudo-static URLs convert complex dynamic URLs into simple URLs similar to static HTML pages, for example:yourdomain.com/news/anqicms-tutorial.htmlSuch URLs have several significant advantages:

  • Improve user experience:The link is clearer, easier to read, and more convenient to share and remember.
  • Optimize search engine friendliness:Search engines tend to crawl and index concise and meaningful URLs. URLs containing keywords also help improve the ranking of relevant pages.
  • Improve the image of the website:A consistent URL structure can make your website look more professional and reliable.

AnQiCMS as a content management system that focuses on SEO optimization, considers static configuration as one of its core features, aiming to help your website gain an advantage in content marketing and search engine rankings.

Easily find the configuration entry for pseudo-static

In the AnQiCMS backend, finding the configuration for pseudo-static rules is very intuitive. After logging into your management backend, you can find it in the left navigation bar.“Function Management”Click it and select“Static Rules”.

Enter the Static Rules page, where you will see a concise and clear configuration interface。”“

Understand the built-in Static Rules mode of AnQiCMS

To facilitate users with different needs, AnQiCMS is built-in with four commonly used pseudo-static rules, you just need to click to select and apply, which greatly simplifies the configuration process.

  1. Numeric mode:This is the most basic mode, usually used for Chinese sites. It uses the content ID as the identifier for the URL, for example:

    • Article details:/article/123.html
    • Category list:/category/456.htmlThis pattern is simple and direct, but the semantics of the URL are slightly weak.
  2. Model naming pattern:It is usually more suitable for English sites. It combines the alias of the model to which the content belongs with the content's ID or a custom filename, for example:

    • Article details:/article-detail/anqicms-tutorial.html
    • Product details:/product-detail/product-name.htmlThis kind of URL is more semantic and better reflects the type of content.
  3. Category naming pattern 1 (commonly used on Chinese sites):This pattern combines the category ID with the content ID or a custom filename, for example:

    • Article list:/category-1/list.html
    • Article details:/category-1/article-123.html
  4. Category Naming Pattern 2 (commonly used on English sites):Similar to the model naming pattern, but emphasizes the alias of the category, for example:

    • Article list:/news/list.html
    • Article details:/news/anqicms-tutorial.htmlThis pattern clearly shows the hierarchy of categories in the URL, which is very friendly for SEO and user understanding.

For most users, just choose one of the four built-in modes that best suits your website needs. If you have more specific customization requirements for the URL structure, thenCustom patternsIt will be your best choice.

Deeply customize the pseudo-static rules.

The custom mode gives you great flexibility, allowing you to design a unique URL structure according to your preferences and SEO strategy.However, due to its relatively complex configuration, it requires extra care during operation to avoid situations where the page cannot be accessed.

Custom static rules are composed of six groups, each corresponding to different types of pages on the website: document details, document list, model homepage, single page, tag list, and tag details. Each rule follows规则名===规则值format.

Custom rule name and corresponding page:

  • archive: Details page of the document (article, product, etc.).
  • category: List page of the category.
  • archiveIndex: Corresponds to the homepage of a content model (such as an article model, product model).
  • page: Corresponds to an independent single page (such as "About Us", "Contact Information").
  • tagIndex: Page listing all tags.
  • tag: Page listing documents for a specific tag.

In规则值In, you can use the following common variables:

  • {id}: The unique ID of the content (e.g., article ID, category ID, tag ID, single page ID).
  • {filename}The custom link name of the content (document or single page). This name is usually the pinyin of the content title or a custom English alias, and you can set it when publishing the document or editing the single page.Ensure its uniqueness across the entire site.
  • {catname}The custom link name of the category. It is also the pinyin or custom alias of the category name, which can be configured in the category settings, and it also needs to ensure uniqueness.
  • {catid}Unique ID of the category.
  • {module}The URL alias for the content model (such as the article model) can be set in the content model management.
  • {page}: Page number. Please note that when you want the pagination parameter to be optional (i.e., the first page does not display the page number), you need to enclose it in parentheses, for example(-{page}).

How to combine these variables to create custom rules?

Here are some examples, you can modify them according to these patterns:

  • Document details page (archive):

    • If you want the URL to look like this:/article-123.html archive===/article-{id}.html
    • If you want the URL to include a custom link name, for example:/news/anqicms-features.html archive===/{module}/{filename}.html
    • If you want the URL to include both category alias and document custom link name:/solutions/marketing-strategies.html archive==={catname}/{filename}.html
  • Category list page (category):

    • If you want the URL to look like this:/category-456.html category===/category-{id}.html
    • If you want the URL to include a custom category link name and optional pagination:/news(-{page}).html category==={catname}(-{page}).html
  • Single page (page):

    • If you want the URL to look like this:/about-us.html page===/{filename}.html
  • Tag detail page (tag):

    • If you want the URL to look like this:/tag-web-design.html tag===/tag-{filename}.html

Important reminder:While using{filename}or{catname}Ensure that you fill in the custom URL while publishing documents, creating single pages, or editing categories"Custom URL"Field. AnQiCMS usually automatically generates pinyin as the default value based on the title, but you can also manually edit it to get a more ideal URL. This custom URL is{filename}or{catname}The content referred to by the variable must be unique.

Application and verification

After you have configured or modified the pseudo-static rules, be sure to click the bottom of the page“Submit”Button to save settings. After that, to ensure that the new rules take effect, you may need to clear the website cache (in the "Update Cache" feature in the background).

The next most critical step isVerifyMake sure to visit your website's front end, check the URL of the article detail page, category list page, single page, and other pages according to your new rules