In website operation, a clear and search engine-friendly URL (Uniform Resource Locator) is crucial for the visibility and user experience of the website.AnQiCMS (AnQiCMS) deeply understands this, providing users with a flexible and powerful custom URL display format feature, allowing you to easily create personalized and SEO-friendly article detail page links according to your needs.
Flexible URL customization, starting from pseudo-static
The core of Anqi CMS in URL management is its 'pseudo-static and 301 redirect management' function.This feature can not only optimize the URL structure but also effectively improve the SEO effect of the website.Through pseudo-statics, complex links with dynamic parameters can become concise and static, more favored by search engines, and also more convenient for users to remember and spread.
In AnQi CMS, you can choose from various preset rules for pseudo-static URLs to meet different website requirements.For example, the system is built-in with 'number pattern', 'model naming pattern', and two 'category naming patterns', and so on.These patterns usually meet the basic needs of most websites, allowing you to have a standardized URL structure without in-depth configuration.
Creating personalized links: Detailed explanation of custom modes
If the preset mode cannot fully meet your refined needs, the Anqi CMS also provides a "custom mode".This is the key to implementing the URL height customization of the article detail page.To enable this feature, you need to go to the 'Feature Management' module in the background and find the 'URL Rewrite Rule' option.
Enter the rule setting page for pseudo-static rules and select 'Custom Mode'. You will see that you can set rules for various types of pages, with the one directly related to the article detail page being 'Document Details' (rule name isarchive)。Every rule is composed of规则名===规则值in the form of,for examplearchive===/article/{id}.html.
The power of custom rules lies in its support for various built-in variables, allowing you to cleverly combine these variables to construct unique URL formats:
{id}: represents the unique ID of the document.{filename}This is the 'custom URL alias' set when the document is being edited.It is usually automatically generated based on the document title, but you can manually modify it to be more descriptive or to include keywords.{catname}This represents the 'custom URL alias' of the document's category. This alias can also be set and modified on the category editing page.{catid}This represents the unique ID of the document's category.{module}【en】: represents the table name of the model the document belongs to (e.g.,)articleorproduct).{page}【en】: used for pagination links, should be placed within parentheses, like(/{page}).
Let's understand how these variables combine with some examples:
A concise ID-style link:
archive===/{module}/{id}.html- For example:
http://yourdomain.com/article/123.html - This format is concise and clear, but not very helpful for SEO keywords.
- For example:
Category+Document Alias-style link:
archive===/{catname}/{filename}.html- For example:
http://yourdomain.com/news/anqicms-tutorial.html - This format combines classification and article keywords, which is very friendly to SEO and also more readable.
- For example:
Model+Classification ID+Document Alias Link type:
archive===/{module}/{catid}/{filename}.html- For example:
http://yourdomain.com/article/5/anqicms-features.html - This format includes more hierarchical information in the URL, suitable for websites with complex content categorization.
- For example:
{filename}and{catname}The cornerstone of URL content.
When using{filename}and{catname}When defining variables, you need to pay special attention to their content settings.The values of these variables are not arbitrary, but rather manually or automatically generated in the respective 'Custom URL' field when you 'add/edit document' and 'add/edit category'.
When editing documents, Safe CMS will automatically generate a pinyin version of a custom URL based on the document title you input.{filename}The default value.You can modify it as needed to make it more SEO-friendly, for example, by including English or pinyin of core keywords.{catname}
Here are some important tips and **practical** suggestions.
- Backup first.Before modifying the pseudo-static rules, it is strongly recommended that you back up the current configuration or database. Incorrect rules may cause the website to be inaccessible, and having a backup will allow for quick recovery.
- Principle of Uniqueness: Whether it is the document's
{filename}or the classification's{catname}, please ensure their uniqueness. Duplicate URLs not only affect user experience but also cause trouble for search engines. - SEO-friendly considerations:
- The URL should be as short and concise as possible, avoiding overly long parameters.
- Include keywords: in
{filename}and{catname}Incorporating the core keywords of the article or category can help improve search rankings. - Use a hyphen: use a dash (
-) instead of an underscore (_) to separate words, which is the recommended practice by search engines. - Avoid deep hierarchy: Too complex URL hierarchy may not be conducive to search engine crawling.
- Changes and 301 redirectsIf your website is already live and you are modifying the URL display format of existing articles, be sure to use the '301 Redirect' feature.Permanent redirect the old URL to the new URL to avoid traffic loss and SEO weight drop caused by invalid old links.
- Clear cacheModify the pseudo-static rules, and if the page does not take effect immediately after, please try to clear the system cache.
With these powerful features provided by Anqi CMS, you can not only flexibly control the display format of article detail page URLs, but also lay a solid foundation for website SEO optimization, improving overall operational efficiency and effectiveness.
Common Questions (FAQ)
Q1: I modified the pseudo-static rules, but the website pages won't open, what's the matter?A1: After modifying the pseudo-static rules, there are several reasons why the website may not open.
1. **规则配置错误**:自定义规则中的变量拼写错误、格式不符合要求,或者规则之间存在冲突。请仔细检查你的规则配置。
2. **未清除缓存**:部分更改可能需要清除系统缓存才能生效,尝试在后台找到“更新缓存”功能并执行。
3. **服务器环境问题**:例如Nginx或Apache的配置未正确加载安企CMS的伪静态规则。在宝塔面板等环境下,需要确保伪静态规则已正确配置到Web服务器中。
Q2:{filename}and{catname}How are the contents of these variables determined, can I customize them?A2: Of course, you can customize them.{filename}The value comes from the 'Custom URL' field you filled in when adding or editing an article.{catname}The value is derived from the 'Custom URL' field you enter when adding or editing a category.The 'AnQi CMS' automatically generates pinyin as the default value based on the article title or category name, but you can manually modify it to a more suitable string according to SEO requirements, such as an English or pinyin abbreviation containing keywords, but ensure that it is unique across the entire site.
Q3: What impact will adjusting the URL format of the article detail page have on the website's SEO?A3: Adjusting the URL format has a significant impact on SEO.A concise, meaningful, and keyword-rich URL is more easily understood and indexed by search engines, which may improve search rankings.At the same time, a friendly URL can also improve user click-through rate and experience.However, if the website is already live and an old URL has been indexed, it is necessary to set up a 301 permanent redirect after changing the URL to point to the new URL to avoid loss of search engine ranking and users encountering broken access.