When the custom URL does not work, how should I investigate the content display problem?

Calendar 👁️ 72

In website operation, a clear and easy-to-understand URL structure is crucial for search engine optimization (SEO) and user experience.AnQiCMS (AnQiCMS) offers powerful custom URL features, allowing you to flexibly configure links based on content models, categories, articles, etc.However, you may sometimes find that the custom URL set up in the background does not display as expected on the front-end page, or that clicking on it results in a 404 error.When encountering this situation, we can follow the following steps to troubleshoot, gradually locate and solve the problem.


I. Start from the Anqi CMS background configuration.

When the custom URL does not work, we should first check the relevant settings of the Anqie CMS backend, which is the most direct and fundamental troubleshooting step.

  1. Check the basic address settings of the websiteFirst, please go toBackend settingsofGlobal Settingsthe page. Confirm that the "Website Address" field is filled with the correct domain name of your website, for examplehttps://www.yourdomain.comThis address is the basis for generating all internal links by the system, and if it is incorrect, all custom URLs may be affected.

  2. Check the configuration of pseudo-static rulesThe rule of pseudo-static is whether the URL can be displayed in a customized format. Please enterfunction managementofStatic rulesthe page.

    • Select the preset mode:The AnQi CMS has built-in multiple static rules such as 'numeric mode' and 'model naming mode'.First, try to select a preset mode that suits your needs, save it, clear the cache, and then observe the front-end effects.
    • Custom Mode:If the preset mode does not meet your personalized needs, you may have enabled the "custom mode". In this mode, you need to carefully check each rule (such asarchive/category/page/tagIs the configuration correct?
      • Ensure that the variables used in the rules (such as{module}/{id}/{filename}/{catname}/{page}) are spelled correctly and the logic meets your expectations. For example, the rules for article details may look likearchive===/{module}/{filename}.html.
      • Pay special attention to the pagination rules (such as{page}) whether it is contained within parentheses, for example(-{page}), this ensures that the link remains correct when there is no pagination.
    • Save and clear cache:No matter which pseudo-static rule you modify, be sure to click the "Save" button and then go toUpdate CacheFunction, completely clear the system cache to make the new rules take effect.
  3. Check the custom URL field at the content levelAnqi CMS allows you to set independent custom URLs for each article, category, single page, and tag when publishing and editing content.

    • Document, Category, Single Page, Tag:AccessContent ManagementbelowDocument Management/Document Category/Document Tag, as well asPage ResourcesbelowPage ManagementCheck whether the 'custom URL' field is filled in and the format conforms to the pseudo-static rules you have defined while editing each specific content.
    • Uniqueness:The custom URL must be unique throughout the entire site.If a duplicate occurs, the system may automatically add random numbers to the URL to ensure uniqueness, which may result in a URL different from what you expect.
    • Field content:By default, the system will automatically generate a pinyin as the URL alias based on the title (url_tokenField), but you can manually modify it. Please make sure that the manually modified URL contains only letters, numbers, and underscores, and avoid using special symbols or spaces.
  4. Clear the system cacheThis is a very easily overlooked but crucial step. After any modifications to URLs, content publishing, or system settings in the Anqi CMS backend, it is strongly recommended that you go toUpdate CacheFunction, click 'Clear Cache Now'. The system cache may store old URL routing information, and failing to clean up in a timely manner may cause new settings to take effect immediately.


Check server environment configuration

Even if the AnQi CMS backend configuration is correct, if your web server (such as Nginx or Apache) does not cooperate properly, the custom URL will still not work or a 404 error will occur.

  1. Verify reverse proxy settingsThe AnQi CMS is usually deployed through web servers like Nginx or Apache for reverse proxy, forwarding external requests to the AnQi CMS service.

    • Nginx configuration:Check your Nginx configuration file (usually in)/etc/nginx/conf.d/or/www/server/nginx/conf/vhost/directory). Ensureproxy_passPoint to the correct port for running the AnQi CMS (default is)https://en.anqicms.com)
    • Apache configuration:If you are using Apache, you also need to confirm that the reverse proxy module is enabled and the target URL is set correctly.The specific configuration can be referred to in the Apache deployment document of Anqi CMS.
  2. Confirm the pseudo-static rules of the Web serverThe server-side pseudo-static rules are the key to making custom URLs effective.It tells Nginx or Apache how to handle a URL that looks like a static file but is actually a dynamically generated page.

    • Example of Nginx pseudo-static rules:
      
      location @AnqiCMS {
          proxy_pass https://en.anqicms.com;
          proxy_set_header   Host             $host;
          proxy_set_header   X-Real-IP        $remote_addr;
          proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
      }
      error_page 404 =200  @AnqiCMS; # 确保404页面被正确转发
      location / {
         try_files $uri $uri/index.html @AnqiCMS; # 尝试寻找文件,否则转发给AnQiCMS处理
      }
      
      Please confirm that your Nginx configuration includes a rule similar totry_filesanderror_pageand the rule, and

Related articles

How to ensure that each site's content can be displayed independently in multi-site management?

In today's increasingly complex digital operation, many companies or individuals often need to manage multiple websites, which may be show sites of different brands, or independent content platforms for different markets or business lines.In response to such needs, AnQiCMS's multi-site management feature provides an efficient and powerful solution, allowing users to unify the operation and maintenance of multiple websites in a single system.However, while enjoying the convenience of management, ensuring that each site's content can be displayed independently without interference is one of the most concerns for operators.

2025-11-08

How to solve the problem of page garbled display caused by incorrect encoding of AnQiCMS template files?

During the process of building a website with AnQiCMS, you may encounter situations where the page display appears garbled, which undoubtedly affects user experience and reduces the value of the carefully crafted page.Generally, such problems are caused by incorrect encoding settings in the template file.This article will detail how to troubleshoot and resolve the problem of garbled display caused by encoding issues in AnQiCMS template files, ensuring that your website content is clear and accurate.### Understanding the Root Cause of Garbled Characters Garbled characters, simply put, are the result of computers using the wrong encoding method to interpret data

2025-11-08

How to use the AnQiCMS random text generation feature to fill placeholder content during the development stage?

In the process of website project development, we often face a common challenge: how to effectively build and test the layout and style of a website in the absence of actual content?From design prototypes to frontend development, filling in real content is time-consuming and impractical, and simple placeholder text is difficult to simulate the visual effects of real content.

2025-11-08

How to display the current year or a custom formatted datetime in the template?

In website operation and content management, displaying accurate date and time is a basic and important requirement.Whether it is the copyright year in the footer, the publication or update date of the article, or the countdown of a specific event, flexible control of the date and time format can greatly enhance the user experience and professionalism of the website.In AnQiCMS, you can easily implement the display of the current year or a custom date and time format using several simple and practical methods.--- ### One: Display the current system year or date and time: Use `{% now %}`

2025-11-08

How to use the AnQiCMS backend settings to centrally manage and display the default thumbnail of the website?

In website operation, images play a vital role, especially when it comes to content lists or sharing, a suitable thumbnail can greatly enhance click-through rates and user experience.However, manually uploading thumbnails for each piece of content is time-consuming and prone to omissions, leading to broken images or a lack of visual consistency on the website page.AnQiCMS is well-versed in this field, providing powerful backend settings features, allowing you to easily achieve unified management and intelligent display of default thumbnails on your website. We will explore the convenient settings of the AnQiCMS backend step by step.

2025-11-08

How to define fields in the content model to achieve personalized display of different types of content?

In AnQi CMS, the content model is the core of website content management, which provides a structured way to organize and display different types of information.Flexibly utilizing the custom field function in the content model can greatly enhance the personalized display capabilities of website content, meeting various unique business needs. ### Core: The flexibility of content models and custom fields AnQi CMS allows us to create or modify content models according to the actual operational needs of the website.This is not just a simple article and product classification, but also the key to customizing data structures for each content type. For example

2025-11-08

How can Anqi CMS protect original content display on the front end through anti-crawling interference codes and watermark functions?

## Protect Originality: How Anqi CMS Protects Your Front-end Content Through Anti-Crawling Interference Codes and Watermark Features In today's explosive growth of digital content, the value of original content is self-evident, but the problem of content theft and plagiarism that follows also causes countless creators a headache.When you put a lot of effort into writing articles or designing beautiful pictures, and they are picked up and published by others without any effort, the feeling of frustration is indescribable.AnQi CMS knows that originality is not easy, so it specially built strong anti-collection interference codes and picture watermarking functions, aiming to display on the front-end layer

2025-11-08

How to traverse and display nested categories or content structures in a template?

In website operation, we often need to build complex and layered content structures, such as multi-level classification navigation, product tree structures, or nested display of related articles under categories.AnQiCMS (AnQiCMS) with its flexible template engine and rich tag features makes it simple and efficient to traverse and display these nested structures in templates.The AnqiCMS template system uses syntax similar to Django, which means you will mainly output data through `{{variable}}` and execute logical control through `{% tags %}`

2025-11-08