Why is my custom URL alias not working, what path configurations should I check?

Calendar 👁️ 63

As an experienced website operations expert, I fully understand the confusion and anxiety you may feel when the custom URL alias you carefully set up does not work as expected.A clean, meaningful URL structure is crucial for a website's SEO performance and user experience.AnQiCMS was designed with flexibility in URL and SEO-friendliness in mind, but to make these features work, we do indeed need to ensure that the configuration of several key paths is correct.

Today, let's delve deeper into the aspects you should check when customizing the URL alias “**”.

Understand the URL operation mechanism of Anqi CMS.

Firstly, we need to have a clear understanding of how AnQi CMS handles URLs.In AnQi CMS, what we refer to as 'custom URL alias' usually refers to the 'custom URL' field that you manually fill in when editing content (such as articles, categories, single pages, or tags), or the 'URL alias' defined in the content model.about-usorproduct-category-shoesIt represents the unique identifier of your content in the URL.

However, simply setting this alias is not enough.The AnQi CMS adopts the "pseudo-staticThe alias setting of the content itself/Configuration of the pseudo-static rules in the AnQi CMS backendas well asYour web server (such as Nginx or Apache) rewrite rulesThese three levels.

First level check: the content alias setting inside the security CMS

Let's start from the Anqie CMS backend and check the content related to custom URL aliases one by one:

  1. Check if the content type supports custom aliases and the correctness of the aliases:

    • Document (article/product)In the "Add/Edit DocumentMake sure you have entered the alias you want here.Anqi CMS will automatically generate a pinyin alias based on the title, but you can manually modify it.{filename}This variable is set, the custom URL will take effect.
    • Document CategoryIn the "Add/Edit Category" page, there is also a "Custom URL" field. The alias entered here needs to use the pseudo-static rules to take effect.{catname}The variable can take effect.
    • single page: Similar to the document, the single-page also has a "custom URL" field, it is also necessary{filename}Variable.
    • Document Tag: When adding/editing document tags, you can also set a "custom URL", it is also necessary{filename}Variable.
    • Content modelIn the 'Content Model Usage Help' it is mentioned that the model itself also has a 'URL Alias' field, which only supports lowercase English letters and corresponds to the static rule.{module}variable. You need to ensure that all custom aliases comply with their respective input specifications (for example, model aliases can only be lowercase English letters, while custom URLs for documents, categories, and tags can be pinyin or phrases you define).
  2. Ensure the uniqueness of the alias: Anqi CMS emphasizes, 'The custom URL must ensure the uniqueness of the entire site.'If the alias you enter is duplicated with existing content, the system will automatically add a random number at the end to ensure its uniqueness.If you find that there are strange numbers added to the end of your alias, it is very likely that the alias you entered has been occupied.

  3. Check the use of the alias in URL rulesThis is crucial. Just setting a custom alias does not mean it will automatically appear in the URL.You need to ensure that the pseudostatic rule configuration that follows explicitly 'calls' these aliases.For example, if you have set a custom URL alias in the document,my-great-articleBut the pseudo-static rules arearchive===/{module}/{id}.html(That is, if you only use module aliases and IDs), then your custom alias will not take effect, and the URL will still be/article/123.htmlin this form.

The second level check: The pseudo-static rule configuration of Anqi CMS backend

The Anqi CMS provides powerful static rule management functionality, which is a key link between your custom alias and the final URL format.

  1. Navigate to the static rule management pageIn Anq CMS backend, find the "Function Management" menu and click on "Static Rule".

  2. Understand the selection of static mode:

    • Built-in modeThe system provides various built-in rules such as "Number Pattern", "Model Naming Pattern", "Category Naming Pattern 1", "Category Naming Pattern 2", and so on. If you currently select the "Number Pattern" (for example,archive===/{id}.htmlIt is clear that custom aliases for documents, categories, and other content will not be used as they are not included in the rules.{filename}or{catname}They will not be used because they are not included in the rules.
    • Custom patternsThis is the most flexible but also most delicate configuration mode. If you want to make full use of custom aliases, you are likely to choose the "Custom mode".
  3. Rule configuration under the custom mode:

    • Check rule variablesIn the custom mode, you need to carefully check each rule (such asarchive/category/page/tagetc.) to see if it contains the alias variable you want to use.
      • To make the custom URL alias of documents, single pages, and tags take effect, the rule value you must include must contain{filename}a variable. For example,archive===/{module}/{filename}.html.
      • To make the custom URL alias of the category effective, the rule value you must include must contain{catname}a variable. For example,category===/{module}/{catname}.html.
      • To make the URL alias of the content model effective, the rule value you need to include must contain{module}Variable.
    • Rule matchingPlease note the structure of the rule. If your rule isarchive===/{module}-{id}.htmlThen the system will always use the content ID to build the URL, rather than the alias you enter in the 'Custom URL' field. Only when the rule explicitly includes{filename}or{catname}At that time, your custom alias will be applied.
    • Save and update cacheAfter completing the modification of the static rules, be sure to click the 'Save' button.Then, go to the "Update Cache" feature in the background, clear all the cache, and make sure that the new rules can be loaded and applied correctly by the system.

Third level check: Rewrite configuration of Web server (Nginx/Apache)

Even if the internal configuration of Anqicms is correct, if your web server does not correctly rewrite external requests to the entry of Anqicms, you will still encounter a "404 Not Found" error when accessing the custom URL.

The AnqiCMS is an independent application developed in Go language, which usually runs on a specific port (default 8001) and is reverse proxied by a web server.This means that your Nginx or Apache needs to configure the corresponding rewrite rules to forward all requests for your domain (especially those that do not directly correspond to static files) to AnQiCMS processing.

  1. Check Nginx configuration:
    • Site configuration file: Locate your Nginx site configuration file (usually located in/etc/nginx/conf.d/or/etc/nginx/sites-available/in the directory).
    • Running directory: Make surerootThe directive points to the AnQiCMS installation directory under thepublicfolder (for exampleroot /www/wwwroot/anqicms.com/public;)

Related articles

How to get the full URL address of the current page being accessed in the template?

## Deep Analysis: How to cleverly get the complete URL address of the current page in Anqi CMS template As an experienced website operation expert, I am well aware that it is a common and important need to accurately obtain the complete URL address of the current page in daily work.In order to set the `canonical` tag, share on social media, pass parameters, or perform data statistics, the accurate URL of a page is core information.

2025-11-06

Can I view the path of the template file on the server directly through the AnQiCMS background online template editing feature?

As an experienced website operations expert, I am well aware of the importance of template management for website personalization and operational efficiency.AnQiCMS (AnQiCMS) boasts its high efficiency and flexibility, which is favored in the content management field. Its template editing function on the back-end provides great convenience for content operators.TodayUnlocking AnQiCMS Template Path

2025-11-06

Where is the AnQiCMS scheduled task script (such as `start.sh`) usually stored?

As an experienced website operations expert, I know that the stable operation of every CMS system is inseparable from the silent support of its core components.Today, let's talk about a seemingly simple but crucial file in AnQiCMS - the scheduled task script `start.sh`, where is it hidden, and what role does it play in the daily operation and maintenance of AnQiCMS.--- ### Revealing AnQiCMS: The Hidden Location of the `start.sh` Scheduled Task Script For AnQiCMS users, whether it is for the first deployment or daily maintenance

2025-11-06

How to view the template file path of the system's default 404, 500 error pages and shutdown prompt page?

As an experienced website operations expert, I know that in the daily operations of a website, we always hope for everything to go smoothly, but unexpected situations are always hard to avoid.Whether it is the user visiting a non-existent page, or the backend server experiencing an occasional failure, or the website needing temporary maintenance, how to elegantly handle these special situations is directly related to user experience and brand image.AnQiCMS is well-versed in this, providing a highly flexible template mechanism to customize these key pages.Today, let's delve into how to find and personalize your 404 in AnQiCMS

2025-11-06

What is the default URL structure of the article detail page in AnQiCMS?

As an experienced website operations expert, I am well aware of the importance of the URL structure of a website for SEO optimization and user experience.In AnQiCMS, a content management system committed to providing efficient and customizable solutions, understanding the URL structure of its article detail page is the foundation for content operation and SEO layout. Let's delve into how the default URL structure of the article detail page in AnQiCMS is designed.--- ## Reveal the default URL structure of AnQiCMS article detail page: Flexible and

2025-11-06

How to view the URL link address of a specific category?

In AnQiCMS (AnQiCMS), managing and obtaining the URL link address of categories is a fundamental and important task in website operation.It is crucial to clearly know how to view and use these links, whether it is for content organization, search engine optimization (SEO), or user navigation.As a content management system dedicated to providing efficient and customizable solutions, AnQiCMS offers flexible and intuitive options in this regard.### Understanding the Basic Structure of AnQiCMS Category URLs The category URL in AnQiCMS is not fixed

2025-11-06

When customizing the content model, which page paths will be affected by the `URL Alias` field?

## Unveiling AnQi CMS Custom Content Model: How Does the "URL Alias" Affect Your Website Page Path??As an experienced website operations expert, I am well aware of the importance of the page path (URL) for user experience and search engine optimization (SEO).A clear, meaningful, and easy-to-understand URL that not only helps users navigate the website better but also effectively improves the crawling efficiency and keyword ranking of search engines.

2025-11-06

When introducing external CDN resources in a template, which template file is recommended to add the relevant code to?

As an experienced website operations expert, I fully understand the importance of managing external resources in a CMS system.Reasonably introducing external CDN resources can not only significantly improve the loading speed and user experience of the website, but also effectively reduce the bandwidth pressure on the server.In an AnQiCMS (AnQi CMS) such an efficient content management system, following its template design specifications, choosing the correct introduction position will make your work twice as efficient.### Understanding AnQiCMS's template structure and philosophy Firstly, we need to understand AnQiCMS

2025-11-06