The importance of website operation, website structure (URL) is self-evident.A clear and meaningful URL not only helps users better understand the page content, but is also a key link in search engine optimization (SEO).Especially for content management systems, setting a reasonable pseudo-static URL structure can significantly improve the display effect and user experience of the website in search engines.
AnQiCMS is a content management system that focuses on SEO optimization and provides strong and flexible support in this aspect.It not only includes a variety of commonly used static rules, but also allows users to customize highly according to their own needs, making your website URL both beautiful and conducive to search engine crawling.
What is a static URL and why is it important?
Firstly, let's briefly understand what a pseudo-static URL is. In the early days of websites, many pages were dynamically generated by scripts, and their URLs typically contained question marks, equal signs, and a long string of parameters (for example:yourdomain.com/news.php?id=123&category=techThis type of URL is called a dynamic URL.
In contrast, pseudo-static URLs use server URL rewriting technology to convert dynamic page addresses into ones that look like static pages (for example,yourdomain.com/news/tech/your-article-title.html)
There are several reasons why static URLs are important:
- Search engine friendliness: Search engine spiders prefer to crawl static or pseudo-static URLs.A clear, hierarchical URL structure helps the crawler understand the architecture and content relevance of the website, thereby improving the page inclusion efficiency and weight assessment.The inclusion of keywords in the URL can also directly indicate the content of the page to search engines, enhancing relevance ranking.
- Enhanced user experience: Users find it easier to understand and remember simple, meaningful URLs.When the URL contains descriptive text, the user can roughly understand the content of the page when viewing the link, which increases the willingness to click and is convenient for users to share and spread.
- Avoid duplicate content issues: Dynamic URLs can sometimes generate multiple URLs pointing to the same content due to issues such as parameter order and case sensitivity, which may be considered duplicate content by search engines, thus affecting the overall SEO performance of the website.Static URLs help to avoid such problems.
AnQiCMS has taken these factors into full consideration from the beginning of its design, committed to providing users with SEO-friendly URL structures.
The entry for setting up the pseudo-static URL in AnQiCMS
In AnQiCMS backend, the entrance design of the pseudo-static feature is very intuitive. You just need to log in to the background management interface, find it in the left navigation bar.function managementand then clickStatic rulesYou can enter the page to set up the pseudo-static rules. This is the core area where you manage and configure the website URL structure.
Four built-in pseudo-static rules provided by AnQiCMS
To facilitate different types of website and operation needs, AnQiCMS has built-in four commonly used pseudo-static rules. This means you do not need to perform complex configuration, just choose a suitable mode for your website, and you can quickly enable pseudo-static:
- Numeric patternIn this mode, the URLs of pages such as document details, document lists, single pages, and document tags are mainly identified by the content ID. For example:
/article/123.htmlThis pattern is concise and clear, suitable for sites with a large amount of content and does not emphasize the semantic meaning of the URL itself. - Model naming patternIf your website focuses more on content model classification, such as product (product) or article (article), this pattern will include the model name in the URL. For example:
/article-123.htmlor/product-your-product-name.htmlThis is very useful for distinguishing different types of content, especially on English websites. - Classification naming pattern 1This pattern highlights the category name in URLs, for example:
/分类名称/文档标题.htmlIt emphasizes the hierarchy of website content ownership, suitable for Chinese websites, and can directly display the classification path of the content. - Classification naming pattern 2: Similar to category naming pattern 1, but may lean towards the concise expression of English sites, for example
/category-name/document-title.html.
You can choose the built-in rules that best meet your needs based on the main audience, content type, and future development plan of your website.
Custom pseudo-static rules: Create a dedicated URL structure
If the built-in rules cannot fully meet your specific needs for the URL structure, AnQiCMS's custom mode will provide you with high flexibility.This is an advanced setting, by combining different variables, you can create a unique URL format.
In custom mode, you can set independent pseudo-static rules for the following six different types of pages:
- Document Details Page (archive)
- Document List Page (category)
- Model Home Page (archiveIndex)
- Single Page (page)
- Tag List Page (tagIndex)
- Tag Details Page (tag)
Each custom rule is composed in the form of "rule name===rule value". For example,archive===/{module}-{id}.html.
In the rule value, AnQiCMS provides a variety of available variables, and you can combine them like building blocks:
{id}The unique ID of the content (such as document ID, category ID, single page ID).{filename}: A custom link name for the content. This is usually a nickname that you can manually enter when editing documents, single pages, or tags, or it may be automatically generated by the system based on the title.{catname}: Custom link name for category, with{filename}Similar, used for classification.{catid}Category ID.{module}Model table name of the content (such asarticle/product){page}: Page number. Please note that the page number must be placed within parentheses, for example(-{page}).
For example, if you want the URL of the article detail page to be域名/文章模型别名/分类别名/文章自定义名称.htmlyou can configure it like this:archive===/{module}/{catname}/{filename}.html
For example, if you want the URL of the article list page to display as域名/分类别名/page-页码.html, you can set it like this:category===/{catname}/page-{page}.html
By combining these variables flexibly, you can achieve almost any URL structure you want.However, it is particularly important to configure custom rules strictly.Any minor error can lead to the page not being accessible, so it is necessary to perform thorough testing after modification.
Custom URL for documents, categories, tags, and single pages
Within the custom static rules,{filename}and{catname}The source of these variables is the "Custom URL" field manually or automatically generated when you edit content on the AnQiCMS backend.
- Document custom URL: When publishing a document, there is a 'Custom URL' field.You can fill it in manually or let the system generate pinyin based on the document title.This custom URL will eventually be as
{filename}It appears in your pseudo-static URL.