As a senior security CMS website operation personnel, I know that a friendly and efficient URL structure is crucial for the SEO performance and user experience of the website.The AnQi CMS provides high flexibility in configuring pseudo-static rules, suitable for both novice users and advanced optimizers.
What pseudo-static rule types are built into the AnQiCMS system and how can the URL structure be customized?
AnQi CMS treats pseudo-static and URL structure management as one of its core functions, aiming to help users easily optimize the performance of their websites in search engines.The system provides a variety of built-in rules to simplify configuration, while also offering powerful customization features to meet the needs of various refined operations.
Internal pseudo-static rule type
For convenience of users, Anqi CMS presets four common pseudo-static rules to cover the needs of different types of websites.These rules can be applied simply, without the need to manually write complex rules.
FirstlyNumber Pattern.In this mode, the URL structure of web pages such as document details, document lists, single-page details, and document tags is mainly based on the content ID./article/123.htmlof which123It is the ID of the article.This pattern is concise and clear, generally applicable on both Chinese and English websites, especially common on Chinese websites, as it directly points to the unique identifier of the content.
ThenModel naming patternThis rule type is more focused on the model name, and 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 look like/product/detail-123.htmlThis pattern is more widely used on English websites, as it helps convey the type of content through the URL itself.
Next isCategory Naming Pattern 1This pattern incorporates the category name into the URL, enhancing the readability and SEO-friendliness of the URL. For example, if the category name is "News Updates", 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 to which the page content belongs.
Finally isClassification naming pattern 2. Similar to the classification naming pattern 1, but there may be subtle differences in the URL structure to accommodate the habits of different English websites. For example, the classification URL may take the form/category-name/page-1.html instead of/category/id/page-1.htmlThis pattern is also common on English websites, emphasizing the representation of category hierarchy 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 modeAllow operation personnel to highly personalize the URL structure. This feature belongs to advanced settings and requires careful configuration by operation personnel to ensure the normal operation of the website.
The custom mode provides six groups of core pseudo-static rule configuration options, each corresponding to different types of pages on the website: document detail page (archive), document list page/categorized page (category)、Model Home Page(archiveIndex)、Single Page(page)、Tag List Page(tagIndex)and Tag Detail Page(tag)。Each rule is in the form of 'Rule Name===Rule Value', for examplearchive===/{module}-{id}.html.
When building custom rules, you can use a series of system-provided variables to dynamically generate URL segments. These variables include:
{id}: the unique identifier ID of the content.{filename}The custom link name of the content, usually the pinyin alias or manually set English alias.{catname}The custom link name of the category, which can also be a pinyin alias or English alias.{catid}: The unique identifier ID of the category.{module}Model table name or URL alias of the content.{page}Page number for pagination. It is important to note that the pagination variable{page}must be enclosed in parentheses to indicate that it is an optional parameter, for example(-{page}).
By flexibly combining these variables, various complex URL structures that meet diverse needs can be created. For example, a customized document detail page rule can bearchive===/articles/{filename}-{id}.htmlIt will combine the document model alias (such as/articles), custom link name and ID.category===/category/{catname}(-{page}), indicating that the category page can have pagination.
{filename}and{catname}etc. for custom link names.
The most critical part of the custom URL structure.{filename}/{catname}These variables are set by operators when editing content in the CMS backend.
InAdd or edit documentsWhen, there will be a "custom URL" field. AnQi CMS will automatically generate a pinyin alias for the URL based on the input document title, as{filename}The default value. Operators can manually modify this value as needed, but must ensure the uniqueness across the entire site. If a duplicate occurs, the system will automatically append a random number to ensure uniqueness.
ForDocument CategoryIn the editing interface 'Other Parameters' of the category, there is also a 'Custom URL' field. It will also automatically generate a pinyin alias as the category name.{catname}or{filename}The value. Similarly, this value also requires uniqueness across the entire site.
Single Page ManagementThe setting method of the "Custom URL" field is similar to that of the document and category, automatically generated according to the page name, and can be manually modified. It also needs to ensure uniqueness.
Document LabelThe editing interface also includes a 'Custom URL' field, whose default value is generated based on the pinyin of the tag name.It should be noted that the custom URL of the label can only contain letters, numbers, and underscores, and spaces are not allowed.
Through these detailed configurations, Anqi CMS ensures that the website URL has both good structural characteristics and is highly aligned with the SEO and brand promotion strategies of the operator.A correct and unified URL structure not only improves the crawling efficiency and ranking of search engines, but also makes it easier for users to understand and remember the content of the page, thereby enhancing the overall website operation effect.
Common Questions and Answers (FAQ)
What is URL rewriting and why is it important for a website?URL rewriting refers to the process of converting dynamic page URLs (usually containing question marks and parameters) into static URLs./article.php?id=123) Translated to look like a static HTML file URL through server configuration (such as/article/123.htmlThe art of ).It is crucial for the website because static or pseudo-static URLs are more concise and readable, which can significantly enhance user experience; at the same time, search engine crawlers prefer to grab static or pseudo-static URLs, which helps improve the inclusion efficiency of the website and its ranking in search results, thereby improving the SEO performance.
when customizing URL structure{filename}and{catname}How are the default values 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 alias URL based on the title or name you enter, as{filename}or{catname}The default value. For example, the article title is “Introduction to Anqi CMS”,{filename}may be generated by default asanqicms-jieshao.Of course, you can manually modify these default-generated aliases to make them more in line with your SEO keyword strategy or brand requirements.Please ensure that the modified custom URL is unique across the entire site, otherwise the system will automatically append random numbers to avoid conflicts.
What will happen if I set incorrect custom rewrite rules, and how can I fix it?If the custom rewrite rules are set incorrectly, the most direct consequence is that the website pages may not be accessed normally, and users 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 fix is to first immediately go back to the "Function Management" -> "Static Rules" page of the AnQi CMS backend and check the custom rules you recently modified.Check the variables and syntax examples provided in the official documentation carefully for spelling errors, incorrect variable usage, or logical defects.If it is difficult to locate the problem, you can try temporarily switching back to an in-built, known to be working URL rewrite rule to restore normal access to the website, and then gradually debug your custom rules.Before making large-scale rule adjustments, it is recommended to verify in the test environment to avoid affecting the online website.