In website operation, a user and search engine friendly URL structure is crucial.It not only allows visitors to understand the page content at a glance, but also facilitates search engines in crawling and understanding your website, which directly affects the SEO performance and user experience of your website.AutoCMS (AutoCMS) knows this well, therefore it built-in powerful pseudo-static functions, allowing you to easily customize the website URL.

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

English static URL: Why is it so important?

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

And pseudo-static URLs are the conversion of this complex dynamic URL into a simple URL similar to static HTML pages, such as:yourdomain.com/news/anqicms-tutorial.html. Such URLs have several significant advantages:

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

AnQiCMS as an SEO-optimized content management system, takes static URL 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 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, then selectPseudo-static rules.

Enter the page of pseudo-static rules, you will see a concise and clear configuration interface.

Understand the built-in pseudo-static mode of AnQiCMS

For the convenience of users with different needs, AnQiCMS is built-in with four commonly used pseudo-static rules. You just need to click to select and apply them, which greatly simplifies the configuration process.

  1. Digital 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 ID or custom filename, for example:

    • Article details:/article-detail/anqicms-tutorial.html
    • Product details:/product-detail/product-name.htmlThis kind of URL pattern is more semantic and can better reflect 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:

    • List of articles:/category-1/list.html
    • Article details:/category-1/article-123.html
  4. Category Naming Pattern 2 (commonly used on English sites):Analogous to model naming patterns, but with more emphasis on category aliases, for example:

    • List of articles:/news/list.html
    • Article details:/news/anqicms-tutorial.htmlThis pattern clearly shows the category hierarchy in URLs, which is very friendly to SEO and user understanding.

For most users, simply choose one of the four built-in modes that best fits your website needs. If you have more refined customization requirements for the URL structure,custom modewill be your best choice.

deeply customize pseudo-static rules

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

Custom rewrite rules consist of six groups of rules, 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:

  • archiveDetails page of the document (article, product, etc.) corresponding to:
  • categoryList page of the category corresponding to:
  • archiveIndex:Corresponds to the homepage of a certain content model (such as an article model, product model).
  • page:Corresponds to an independent single page (such as “About Us”, “Contact Information”).
  • tagIndex:corresponds to the list page of all tags.
  • tag:corresponds to the document list page of a specific tag.

In规则值In it, 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}:Content link name for the (document or single page) custom.This name is usually the pinyin or a custom English alias of the content title, which you can set when publishing documents or editing single pages.Ensure its uniqueness throughout the entire site.
  • {catname}:Category custom link name. It is the pinyin or custom alias of the category name, which can be configured in the category settings, and also needs to ensure uniqueness.
  • {catid}The unique ID of the category.
  • {module}:Content model (such as article model) URL alias, which 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), it needs to be enclosed 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 custom document 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:When using{filename}or{catname}Make sure to fill in the variable when publishing documents, creating a single page, or editing categories in the background:Custom URL字段。AnQiCMS通常会根据标题自动生成拼音作为默认值,但您也可以手动编辑以获得更理想的URL。这个自定义URL就是{filename}or{catname}The content referred to by the variable, it must be unique.

Application and verification

After you have configured or modified the pseudo-static rules, be sure to click theSubmitButton 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 isVerifyPlease make sure to visit the front end of your website, check the URL of the article detail page, category list page, single page and other pages according to your new rules