In website operation, a clear and meaningful URL path not only improves 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 need and provides the function of flexible customization of articles, categories, and single page URL paths.

How does AnqiCMS support custom URL?

AnqiCMS has built-in powerful pseudo-static functions, which allow your website pages to have the same URL structure as static HTML files, even if their content is dynamically generated.This kind of static-like URL 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 static rule configuration to ensure that these custom URLs can work normally.This means you can摆脱 traditional CMS fixed rigid URL format, according to your content strategy and SEO needs, create a unique URL.

Operation steps for custom URL path

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

First step: Understand the variables in the pseudo-static rule

Before customizing the specific URL, we first need to understand several key variable placeholders in the AnqiCMS pseudo-static rules. They are the basis for building dynamic URLs:

  • {id}The unique ID of the content (article, category, single page, etc.).
  • {filename}The value filled in the 'Custom URL' field in the content backend, which is usually the pinyin of the content title or a custom English alias.
  • {catname}The value entered in the 'Custom URL' field of the category backend, usually the pinyin or custom English alias of the category name.
  • {catid}Unique ID of the category.
  • {module}: The URL alias of the content model (such as article, product).
  • {page}:The page number for pagination.

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

Step two: Customize the article's URL path

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

  1. Go to 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, you will usually find an input box named "Custom URL" in the "Other Parameters" area.
  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 already exists, the system may automatically add a numeric suffix to ensure its uniqueness.
  4. Save article:After entering, save your article.

The value of this 'custom URL' will correspond to the static rules in.{filename}Variable.

Moreover, on the article editing page, you can also find the 'Fixed Link' field.This field is used to set the canonical URL of the current page, mainly for SEO purposes, to inform 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: Custom category URL path

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

  1. Enter the category editing page:Navigate to 'Content Management' -> 'Document Category', click the 'Edit' button next to the category you want to edit.
  2. Find the "Custom URL" field:In the "Other Parameters" area of the category editing page, you will see a "Custom URL" input box.
  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 throughout the site.

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

Step 4: Customize the URL path of a single page

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

  1. Enter the page to edit the page:Navigate to "Page Resources" -> "Page Management", select "Add Single Page" or click the "Edit" button of an existing single page.
  2. Find the "Custom URL" field:In the single-page editing page, you can set a unique path alias for this page in the 'Custom URL' input box.
  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.{filename}Variable.

Advanced settings: Customize pseudo-static rules

After completing the URL customization at the content level, the next most critical step is to configure the global pseudo-static rules to make these custom URLs truly effective and accessible.

  1. Enter the static rule management:Navigate to "Function Management" -> "Static Rule".
  2. Select or configure a custom mode:AnqiCMS provides some predefined static rules patterns (such as number 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 listing multiple sets of rules, each in the format规则名===规则值. 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),tagIndex(Tag Home),tag(Tag details) etc., you can modify it according to your needs.
  4. Use variable combination:In规则值Part, you can use the variable placeholders mentioned earlier (such as{id}/{filename}/{catname}/{module}/{page}) to combine into a URL structure that meets your expectations.
    • For example, if you want the article URL to be域名/文章模型别名/自定义URL别名.htmlthenarchiveThe rule can be set toarchive===/{module}/{filename}.html.