AnQiCMS (AnQiCMS) is an efficient and flexible content management system, and the configuration of its pseudo-static rules is an important part of website SEO and user experience optimization. Many website operators pay attention to a core issue when adjusting their sites: How will the change of AnQiCMS pseudo-static rules affect the generation of navigation links?In the end, navigation links are the main path for users to access website content, and they are also a key basis for search engines to crawl website structure.As an experienced website operations expert, I am happy to delve into this mechanism for you.
AnQiCMS URL Rewriting Rules and URL Structure
First, let's briefly review the pseudo-static rules in AnQiCMS.Static URLs, as the name suggests, make dynamically generated pages look like static HTML files, with concise and meaningful URL structures.This is crucial for Search Engine Optimization (SEO) because search engines tend to crawl and index those URLs that are well-structured and contain keywords.At the same time, a clean URL is easier for users to remember and share, enhancing the overall user experience.
AnQiCMS knows this point well, therefore it provides powerful pseudo-static configuration features.You can find the 'URL Rewrite Rules' option in the 'Feature Management' section on the backend./article-123.html)、Model Naming Pattern (e.g.)/news/title-of-article.html)、Category Naming Pattern, etc., these patterns can meet the needs of most websites.
But the powerful aspects of AnQiCMS go far beyond this, it also provides a highly flexible "custom mode". Through this mode, you can use a series of preset variables (such as{id}Represents content ID,{filename}Represents custom filename or alias,{catname}Represents category alias,{module}Represents model alias,{page}Page number (e.g., ) to build a unique URL structure. For example, you can set the URL of the article detail page to/{module}/{filename}.html, or set the category list page to/{catname}/page-{page}.html.
Dynamic generation mechanism of navigation links
How will the changes to these pseudo-static rules affect the navigation links of the website? The core mechanism here lies in the 'dynamic generation' capability of AnQiCMS.
AnQiCMS handles website navigation, content lists, and any place that needs to reference internal links without storing a fixed, hardcoded URL address. Instead, it will useThe currently active pseudo-static rules of the systemDynamically calculate and generate these links.This means that when you adjust the pseudo-static rules in the background and save them, the system will immediately apply the new rules to all places that need to generate links.
For example, when using templates.navListWhen generating navigation menus with tags, each menu item (item) has aLinkattribute.LinkThe value of the attribute is, it is calculated in real-time by AnQiCMS according to the pseudo-static rules of the current activity, combined with the ID, alias and other information of the content pointed to by the menu item (such as categories, documents, single pages, etc.). Similarly,archiveListWhen traversing the article list in the tag, each article follows the same dynamic generation logic.item.LinkAlso follows the same dynamic generation logic.
Therefore, when you switch from one pseudo-static mode to another (such as from number mode to model naming mode), or modify the URL variable combination in a custom mode, all internal links automatically generated by AnQiCMS on the website front end will change accordingly to match the new URL structure.This process is automatically completed by the system, no manual modification of each link in the template file is required.
The impact and practical considerations after the change
After understanding the dynamic generation mechanism, let's take a look at the specific impacts and注意事项 in operation:
Immediate effect (requires cache clearing)Once the pseudo-static rules are modified and saved in the background, theoretically the system will immediately adopt the new rules.But in actual deployment, to ensure that the front-end page can load the latest link structure, it is strongly recommended that you perform the "Update Cache" operation promptly after modifying the rules.After the cache is cleared, when users visit the page, AnQiCMS will regenerate links to ensure they comply with the new pseudo-static rules.
Priority of content custom URLAnQiCMS allows you to set a "custom URL" when adding or editing documents, categories, tags, and single pages. These custom URLs are usually used in pseudo-static rules.
{filename}or{catname}This variable will take effect only when this kind of variable is used.If a custom URL for a content is set and the current pseudo-static rules support using these aliases, then the URL of the content will be prioritized to use the custom URL you manually set, rather than generated completely according to the general rules.This means that you can maintain a specific URL structure for individual important pages without being disturbed by changes in general rules.{filename}or{catname}Then even if a custom URL is set, it will not be used, but will be generated as an ID-based link according to the existing rules.Impact on search engines and 301 redirectsThe change of pseudo-static rules, especially for a website that has been running for a while, means that a large number of URL structures may change.This is a challenge for search engines.If the search engine still tries to access the old URL and these URLs are no longer valid, it will result in a large number of 404 errors, severely damaging the website's SEO ranking.AnQiCMS provides the '301 Redirect Management' feature.After changing the pseudo-static rules, it is essential to carefully plan and set up a 301 permanent redirect from the old URL to the new URL.This is like putting a 'moving notice' on an old address, telling search engines and users that the content has permanently migrated to a new address.This ensures both user experience and transfers the accumulated SEO authority from the old URL to the new URL.
The impact on external links and hard-coded linksIt should be noted that AnQiCMS's pseudo-static rules and dynamic generation mechanism are only applicable to internal links generated by the system itself.If there are some absolute path links manually inserted in the article content of your website, or if external websites reference specific URLs of your website, these links will not be automatically updated due to the pseudo-static rules of your background.For internal links hardcoded in the content, you may need to use the 'Replace All Site Content' feature for batch modification; for external links, it is even more crucial to rely on 301 redirects to direct traffic.
Summary
AnQiCMS demonstrates high intelligence and flexibility in pseudo-static rules and navigation link generation.It ensures that the internal links of the website always remain consistent with the pseudo-static rules you set, greatly reducing the burden on operators to manually maintain the links.However, this flexibility also requires us to maintain a cautious attitude when adjusting rules, fully understand its working principles, and combine operations such as 301 redirects, clearing caches, etc., to ensure that the website's SEO performance and user experience are not negatively affected.Using the pseudo-static function of AnQiCMS is a powerful tool to enhance your website value.
Common Questions (FAQ)
Q1: Why are some navigation link URLs still in the old format after modifying the AnQiCMS pseudo-static rules?A1: This is usually because the website cache has not been updated in time.AnQiCMS will use cache to accelerate the loading of pages.