In website operation, a clear and semantically meaningful URL structure is crucial for search engine optimization (SEO) and user experience.AnQiCMS (AnQiCMS) provides flexible pseudostatic rule configuration, allowing operators to customize URLs according to actual needs.{filename}The field is associated, which is a key step in customizing the URL.
Understanding the custom URL of a single page.
In the Anqi CMS backend management system, when we create or edit a single page, we will find a field named "Custom URL".This field is established to allow operators to define a clear and concise URL alias for specific single-page content.contact-usA page about 'Service Details' can be set asservice-details.
The system will automatically generate a pinyin-formatted custom URL based on the page name you enter, to simplify the operation process.However, in order to achieve **SEO effects and brand consistency, we usually choose to manually edit this field, filling it with keywords and easy-to-remember English or pinyin phrases.It should be noted that each custom URL of a single page must be unique throughout the entire website.If a duplicate occurs, the system will automatically add a random number to the end of the URL to ensure its uniqueness, but this may affect the aesthetics and SEO-friendliness of the URL, so it is recommended to ensure its uniqueness when creating it.
Configure static rule association{filename}
To make the 'custom URL' you set in the single page take effect and appear in the front-end website address, you need to take advantage of the powerful pseudo-static rule function of Anqi CMS.The static rules are located under the "Function Management" module in the background and are the core of defining the website URL structure.
In the static rule configuration interface, several preset modes are usually provided, but in order to implement single-page custom URL and{filename}The association, we need to select the "Custom mode".In custom mode, you can set the URL generation rules separately for different types of content (such as document details, category lists, single pages, etc.)
For single-page, we need to focus onpageThe rule corresponds. Anqi CMS provides a flexible variable, namely{filename}It dynamically retrieves the 'custom URL' content you fill in on the single page. Therefore, an example of a common, perfect static rules that can be associated with the single page custom URL is as follows:
page===/{filename}.html
The meaning of this rule is: all single-page URLs will start with the website's root directory, followed by the value defined by the single page{filename}, and followed by.htmlEnding as a file extension. For example, if you set a custom URL for the 'About Us' page isabout-usAnd the final access address of the page will be as shown by the pseudo-static rules.yourdomain.com/about-us.html.
By this means,{filename}The variable serves as a bridge connecting the content management backend with the frontend URL, ensuring that the custom URL settings you make in the backend are accurately reflected in the website's access path.
Actual operation and workflow
In order to associate the custom URL of a single page with the static rules in{filename}Field, you can follow the following steps:
First, log in to the AnQi CMS backend, navigate to 'Content Management' under 'Page Management'.Select to create a new single page or edit an existing single page.In the editing page, find and fill in the 'Custom URL' field.company-profile.
Next, go to the settings of "Static Rules" under "Function Management". In the rule list, select "Custom Mode", and make sure that the rules for thepagetype are set topage===/{filename}.htmlIf your rules are different from this, please modify and save them.
After completing the above configuration, please go to the 'Update Cache' feature in the background and clear all system caches.This step is very critical because the change of pseudo-static rules and the creation of new pages may require cache refresh to take effect on the front end.
Now, when you visit the website, the original single-page (such asyourdomain.com/page/1.html)Will be based on your custom URL and rewrite rules, in a new form such asyourdomain.com/company-profile.htmlThis structure not only improves the readability of the URL, but also provides a more friendly signal for search engines to crawl and understand the page content.
Frequently Asked Questions (FAQ)
1. Why did I set a custom URL, but the front-end URL is stillyourdomain.com/page/id.htmlin the form of?
This is usually because you have not enabled "custom mode" in the "pseudo-static rules" or in the "custom mode" underpagethe rules are not correctly configured to use{filename}fields such aspage===/{filename}.html). Moreover, after modifying the pseudo-static rules, you must clear the system cache for it to take effect.
2. Can I use Chinese or special characters in the custom URL of a single page?
It is not recommended to do this. Although the system may handle Chinese URLs in some cases, for compatibility and SEO **practices, it is recommended to use English letters, numbers, and hyphens for custom URLs (-)。Special characters are usually encoded, making URLs difficult to read and remember.
3. If I change the static rules inpagethe type rules from/{filename}.htmlback to/{id}.htmlWould the custom URL from before still work?
No. Once you changepagethe rule back to using{id}The system will no longer use the 'custom URL' you entered in the single page as part of the URL, but will instead use the database ID of that single page to generate the URL.To avoid link failure, it is recommended to plan the redirection in advance when modifying the static rule, or ensure that your URL strategy is stable and consistent throughout.