As a senior security CMS website operator, I know that a friendly and efficient URL structure is crucial for the SEO performance and user experience of the website.AnQi CMS provides high flexibility in configuring pseudo-static rules, suitable for both beginners and advanced optimizers, and everyone can find an appropriate solution.

The static rule type built-in to AnQi CMS and URL structure customization

The AnQi CMS treats pseudo-static and URL structure management as one of its core features, aiming to help users easily optimize their website's performance in search engines.The system provides a variety of built-in rules to simplify configuration, while also opening up powerful customization features to meet the needs of various refined operation requirements.

Built-in static rule type

To facilitate users, Anqi CMS has preset four common pseudo-static rules to meet the needs of different types of websites.These rules can be applied simply, without the need to manually write complex rules.

FirstlyNumeric patternIn this mode, the URL structure of web pages such as document details, document lists, single-page details, and document tags is mainly based on content ID.For example, the URL of an article might be/article/123.htmlof which123It is the ID of the article. This pattern is concise and clear, usually applicable on both Chinese and English websites, especially common on Chinese websites, as it directly points to the unique identifier of the content.

Next isModel naming patternThis rule type is more focused on the model name, the URL will include the alias of the model itself. For example, if there is a product model, its URL alias will beproductThen the URL of the product detail page may be like/product/detail-123.htmlThis pattern is more widely used on English websites because it helps convey the type of content through the URL itself.

Next isClassification naming pattern 1. This pattern integrates the category name into the URL, enhancing the readability and SEO-friendliness of the URL. For example, if the category name is "News and Dynamics", the URL may display as/news/list-123.htmlor/news/article-detail-456.htmlThis pattern is especially suitable for Chinese websites, making it easier for users and search engines to understand the category of the page content.

Finally isClassification naming pattern 2.Similar to category naming pattern 1, but there may be subtle differences in URL structure to accommodate the habits of different English websites. For example, category URLs may adopt/category-name/page-1.htmlin the form, rather than/category/id/page-1.htmlThis pattern is also common on English websites, emphasizing the representation of classification levels in URLs.

These built-in rules are designed to lower the threshold for pseudo-static configuration, allowing websites to quickly have SEO-friendly URLs.

How to customize URL structure

When the built-in rules cannot meet specific SEO strategies or brand needs, Anqi CMS providesCustom patternsAllow operation personnel to highly customize the URL structure. This feature belongs to advanced settings and requires careful configuration by the operation personnel to ensure the normal operation of the website.

The custom mode provides six groups of core pseudo-static rule configuration options, corresponding to different types of pages on the website: document detail page (archive), document list page/categorization page (category), model home page (archiveIndex)、Single page(page), tag list page (tagIndex) and tag detail pages(tagEach rule is composed of the form "rule name===rule value", for examplearchive===/{module}-{id}.html.

When building custom rules, a series of system-provided variables can be used to dynamically generate URL segments. These variables include:

  • {id}The unique identifier ID of the content.
  • {filename}The custom link name of the content, which is usually a pinyin alias or a manually set English alias.
  • {catname}The custom link name of the category, which can also be a pinyin alias or an English alias.
  • {catid}: The unique identifier ID of the category.
  • {module}Model table name or URL alias for the content.
  • {page}: Page number. It should be noted that the pagination variable{page}must be enclosed in parentheses to indicate that it is optional, for example(-{page}).

By combining these variables flexibly, it is possible to create URL structures that meet various complex requirements. For example, a custom document detail page rule could bearchive===/articles/{filename}-{id}.htmlIt will combine the document model alias (such as/articles), custom link name and ID. For category pages, it can becategory===/category/{catname}(-{page}), indicating that the category page can have pagination.

{filename}and{catname}etc. custom link name settings

The most critical in the custom URL structure{filename}/{catname}These variables, their values are set by the operation personnel when editing content in the CMS background.

InAdd or edit documentsThere will be a "custom URL" field. Anqi CMS will automatically generate a pinyin form of the URL alias based on the input document title, as{filename}The default value. Operators can manually modify this value as needed, but must ensure the uniqueness of the entire station. If a duplicate occurs, the system will automatically append a random number to ensure uniqueness.

ForDocument CategoryIn the editing interface of the 'Other Parameters' in the category, there is also a 'Custom URL' field. It will also automatically generate a pinyin alias based on the category name as{catname}or{filename}The value. Similarly, this value also requires uniqueness throughout the entire site.

Single page managementThe 'custom URL' field setting method is similar to that of the document and category, automatically generated according to the page name, and can be manually modified, and it also needs to ensure uniqueness.

Document TagThe editing interface also includes a 'Custom URL' field, whose default value is generated according to the pinyin of the tag name.It should be noted that the custom URL of the tag can only contain letters, numbers, and underscores, and spaces are not allowed.

With these detailed configurations, Anqi CMS ensures that the website URL has good structural characteristics and is highly consistent with the SEO and brand promotion strategies of the operator.A correct and unified URL structure not only improves the efficiency and ranking of search engine crawling, but also makes it easier for users to understand and remember the page content, thereby improving the overall website operation effect.

Frequently Asked Questions (FAQ)

What is URL rewriting (pseudo-static) and why is it important for a website?URL rewriting refers to redirecting dynamic page URLs (usually containing question marks and parameters such as/article.php?id=123)The URL configured on the server is transformed into one that looks like a static HTML file (such as/article/123.htmlThe technique. It is crucial for websites, as pseudo-static URLs are more concise and readable, significantly improving user experience;At the same time, search engine crawlers prefer to capture static or pseudo-static URLs, which helps to improve the inclusion efficiency of the website and its ranking in search results, thereby improving SEO performance.

When customizing the URL structure,{filename}and{catname}How is the default value generated? Can I modify them?In AnQi CMS, when you create or edit documents, categories, single pages, or tags, the system will automatically generate a pinyin-formatted URL alias based on the title or name you enter, as{filename}or{catname}The default value. For example, the article title is "Anqi CMS Introduction", its{filename}may be generated by default asanqicms-jieshaoOf course, you can manually modify these default-generated aliases to make them more in line with your SEO keyword strategy or brand requirements.But please make sure that the modified custom URL is unique throughout the entire site, otherwise the system will automatically append random numbers at the end to avoid conflicts.

What will happen if I set incorrect custom rewrite rules for my website? How can I fix it?If the custom static rule setting is incorrect, the most direct consequence is that the website page may not be accessed normally, and the user will see a 404 error page or be redirected to an incorrect location.This will severely affect user experience and the website's SEO. The solution is to first immediately go back to the Anqi CMS backend's 'Function Management' -> 'Static Rules' page and check the custom rules you recently modified.Check the variables and syntax examples provided in the official documentation for spelling errors, incorrect variable usage, or logical defects.If it is difficult to locate the problem, try temporarily switching back to a built-in, known working static rule to restore normal website access, and then gradually debug your custom rule.Before making large-scale rule adjustments, it is recommended to verify in the test environment to avoid affecting the online website.