In website operation, a clear and meaningful URL path not only enhances user experience but is also one of the key factors in search engine optimization (SEO).AnqiCMS as an efficient content management system, fully considers this requirement, and provides you with the function of flexible customization of article, category and single page URL path.

How does AnqiCMS support custom URL?

AnqiCMS has built-in powerful pseudo-static features, which allows your website pages to have a URL structure like static HTML files, even if their content is dynamically generated.This URL with pseudo-static features is easier for users to understand and remember, and it is also easier for search engines to crawl and index, thus improving the overall SEO performance of the website.

AnqiCMS allows you to define personalized URL aliases directly when publishing content, and provides global pseudo-static rule configuration to ensure that these custom URLs can work normally.This means you can摆脱 traditional CMS fixed rigid URL formats, according to your content strategy and SEO needs, create a unique URL.

Operation steps for custom URL path

To customize the URL paths of articles, categories, and single pages, you need to understand and operate at two main levels: first, the custom URL entry at the content level, and second, the configuration of pseudo-static rules at the system level.

第一步:Understand the variables in the pseudo-static rules

Before customizing specific URLs, we first need to understand several key placeholder variables in AnqiCMS pseudo-static rules. They are the foundation for building dynamic URLs:

  • {id}:Content ID for articles, categories, single pages, etc.
  • {filename}:Content backend 'Custom URL' field value, usually the pinyin or custom English alias of the content title.
  • {catname}:Category backend”Custom URL”field value, usually the pinyin of the category name or a custom English alias.
  • {catid}The unique ID of the category.
  • {module}The URL alias of the content model (such as article, product).
  • {page}:Used for pagination, indicating the page number.

After understanding these variables, you can combine them according to your needs to create various URL structures in the pseudo-static rules.

第二步:Customize the article's URL path

When you publish or edit articles in the AnqiCMS backend, you can set a unique URL path for each article.

  1. Enter the editing page:Navigate to "Content Management" -> "Document Management", select "Publish Document" or click the "Edit" button on an existing article.
  2. Find the 'Custom URL' field:Below the article editing interface, usually in the "Other Parameters
  3. Enter your custom path:AnqiCMS will automatically generate a default pinyin URL alias based on the article title you enter.If you are not satisfied, you can manually enter the English alias you want in this input box.
    • Important reminder:This custom URL must be unique across the entire site. If the alias entered already exists, the system may automatically add a number suffix to ensure its uniqueness.
  4. Save article:Complete the input and save your article.

The value of this 'Custom URL' will correspond to the static rules in pseudo-dynamic rules.{filename}a variable.

In addition, you can also find the 'Fixed Link' field on the article editing page.This field is used to set the canonical URL of the current page, which is mainly for SEO purposes. It tells search engines which is the authoritative version of the content to avoid duplicate content issues.If not required, it can usually be left blank.

Step 3: Customize the URL path for category

The URL path of the category page can also be personalized, which is crucial for building a clear website structure and enhancing the SEO of the category page.

  1. Enter the category editing page:Navigate to 'Content Management' -> 'Document Categories', click the 'Edit' button next to the category you want to edit.
  2. Find the 'Custom URL' field:In the "Other Parameters
  3. Enter your custom path:Similarly, the system will automatically generate a pinyin alias based on the category name. You can modify it to a more descriptive English alias as needed.
    • Important reminder:The custom URL of the category also needs to ensure uniqueness across the entire site.

The value of this 'Custom URL' will correspond to the static rules in pseudo-dynamic rules.{catname}Variable (or can also be used in some rules){filename}).

Step 4: Customize the URL path of a single page.

AnqiCMS single page, such as 'About Us', 'Contact Us', etc., can also have a concise and clear custom URL.

  1. Enter page editing page: Navigate to “Page Resources” -> “Page Management”, select “Add Single Page” or click the “Edit” button on an existing single page.
  2. Find the 'Custom URL' field:In the 'Custom URL' input box on the single-page editing page, you can set a unique path alias for this page.
  3. Enter your custom path:Enter the English alias you wish to use and ensure its uniqueness.

The value of this 'Custom URL' will correspond to the static rules in pseudo-dynamic rules.{filename}a variable.

Advanced settings: Custom rewrite rules

Completed the content-based URL customization, the most critical step is to configure the global pseudo-static rules to make these customized URLs truly effective and accessible.

  1. Enter the pseudo-static rule management:Navigate to 'Function Management' -> 'Pseudo-static Rule'.
  2. Select or configure a custom mode:AnqiCMS provides some preset rewrite rule patterns (such as numeric patterns, model naming patterns, category naming patterns, etc.), you can choose one to apply quickly.
    • To achieve the most flexible customization, you need to select "Custom Mode".
  3. Edit rules:In Custom mode, you will see a text box that lists multiple sets of rules, with the format of each rule being规则名===规则值. For example:
    
    archive===/{module}/{filename}.html
    category===/{catname}/
    page===/page-{filename}.html
    
    • archive:Define the URL structure of the article detail page.
    • category:Define the URL structure of the category list page.
    • page:Define the URL structure of the single page detail page.
    • Other rules include:archiveIndex(Model home page),tagIndex(Tag home page)、tag(Tag details) etc., you can modify them according to your needs.
  4. Using variable combinations:In规则值Part, you can use the variables placeholders mentioned earlier (such as{id}/{filename}/{catname}/{module}/{page}) to combine a URL structure that meets your expectations.
    • For example, if you want the article URL to be域名/文章模型别名/自定义URL别名.htmlso thatarchiveThe rule can be set toarchive===/{module}/{filename}.html.