Practical configuration of static URL and 301 redirection

📅 2026-11-01 👁️ 0

Configure static rules and 301 redirect in AnQiCMS in two steps: first, determine the address style and enable the rules in the background static rule management, so that the column pages and content pages can be accessed with readable addresses; then, use 301 redirect to point historical addresses one by one to the new standard addresses. Both work together, and the revised site will not lose the inclusion and external link weight due to address changes.

Understand the problem to be solved first

The page of the content management system is dynamically rendered, but the address exposed to the outside should not contain a string of query parameters. The role of pseudo-static is: visitors see/blog/123.htmlThis kind of stable address, the program still retrieves data according to the original logic internally. There are three benefits: readable address, easy to crawl, and parameters are not lost when copied and shared

301 redirect solves the problem on the timeline: changing the column name, changing the article classification, and migrating from the old system will leave invalid or duplicate old addresses. 301 tells the search engine 'The content has moved, and the weight is recorded on the new address.'

The order of configuring pseudo-static rules

AnQiCMS supports static rules management, and you can customize the static URL. It is recommended to operate in this order to avoid redoing the work:

  1. Determine style: Decide the form of columns, content, categories, and tags first, and unify the entire site;
  2. Enable rules: Enable the corresponding rules in the background and save them item by item;
  3. Check the homepage: After clearing the cache, visit the homepage, column page, and content page once each;
  4. Check submissions: After generating the site map, check several URLs to confirm that they are consistent with the rules;
  5. Check robots: Confirm that robots.txt does not block the newly generated directory format.

Try to make each rule correspond to a type of page, and ensure that rules do not produce ambiguous matches. Once an address is determined and released, it should not be frequently changed. Changing it once requires updating a batch of 301 redirects.

Configure 301 redirect

AnQiCMS provides 301 redirect management, used to set URL redirection. Three types of scenarios are worth registering one by one:

  • Revision residue: the old column address points to the new column page;
  • Content merging: the deleted address points to the retained article after merging multiple articles on the same topic;
  • Address normalization: addresses with parameters, differences in slashes, and case differences are unified to point to the standard version.

When performing batch migration, first export the old address list into a table, label each new target item by row, and then enter the redirect rules. After going live, verify by sampling to ensure the return status code is 301, not a soft redirect of 302 or 200.

Common faults and troubleshooting

Phenomenon Check first
Page 404 Whether the pseudo-static rules are enabled, and whether the Web server rewrite module is effective
The address jumps back to itself Two rules point to each other to form a loop, delete one of them
Multiple addresses on the same page can be accessed Lack of normalization 301, the weight is分流
Changes do not take effect Cache not cleared, or the rule saving order has overwritten the previous one

Looping redirects are the most need to be vigilant: A points to B, B points back to A, browsers and crawlers will interrupt the grab. With each additional 301, make sure the target address itself does not produce any jump.

Regular wrap-up

Rules are not finished after configuration. Do a cleanup once a quarter: Supplement redirect or confirm complete deletion of 404 addresses appearing in the access log; take down old rules that are no longer accessed; check that the sitemap and robots'口径 are still consistent.

Common questions

What is the difference between pseudo-static and real static?Static will generate an actual HTML file, while pseudo-static only rewrites the address level, and the content is still rendered by the program, with lower maintenance costs.

Will changing the address affect the existing ranking?Yes, it will, so it must be paired with 301 item-by-item migration instead of allowing the old address to directly 404.

Is it better to have more rules?No, redundant rules can lead to ambiguous matching and difficulty in troubleshooting, and it is more stable to simplify the configuration according to the type of page.

Related articles

Use anchor text management to enhance on-site SEO weight transmission

Anchor text is the segment of text within an internal link, which determines how a search engine understands the theme of the page being pointed to. This article explains how to establish a keyword library, automatically add anchor text links to in-site keywords, control duplicate anchor text and link density, let the weight pass along with content relevance, and provide the steps and self-checking method for over-optimization of AnQiCMS anchor text management.

2026-11-01

Why Static URL and 301 Redirect are the Infrastructure of Enterprise SEO That Cannot Be Neglected

Static URL determines how the URL looks and whether it can be reliably indexed, while 301 redirect determines the weight of the old link and whether visitors will lose after the address changes. Enterprises consider these two items as infrastructure because once the address rules change after the growth of columns and articles, the impact is the entire site rather than a single page. It is recommended to first define the static URL rules, then converge the historical addresses, and finally check whether the sitemap and push are synchronized.

2026-11-01

BaoTa one-click deployment AnQiCMS: from Docker image to production environment

AnQiCMS provides four available deployment options: Baota panel one-click deployment, overseas version aaPanel, traditional LNMP command deployment, and directly pulling the Docker image anqicms/anqicms. The program listens on port 8001 by default, with the 80 and 443 ports forwarded by the reverse proxy. When choosing, mainly look at three things - whether there is already a panel hosting environment, whether containerized publishing is needed, and who is responsible for backups and rollbacks.

2026-11-01

Scheduling release and recycling station: automation and fault tolerance of the content workflow

Scheduling is solved by time factors, error tolerance by the recycle bin: AnQiCMS divides documents into four states: formal documents, drafts, pending release, and recycle bin. Timely publication allows content to automatically become formal at the agreed time. Deleted formal documents can be recovered by entering the recycle bin, and drafts with the link preview=true can be previewed. With the cooperation of both, the content team does not need to rely on manual monitoring, and publication accidents can be rolled back within a few minutes.

2026-11-01

How to configure content security audit on the corporate website, how to configure AnQiCMS's sensitive word filtering and reCAPTCHA?

How to prevent malicious content and robot submissions on the corporate website, it can be configured in three layers: 'Interception before submission, review before storage, and account layer protection': AnQiCMS's sensitive word filtering and keyword replacement are responsible for text control before storage, content review process controls the release gateway, form integration with reCAPTCHA verification code blocks robot batch submission, JWT authentication and prevention of SQL injection, XSS ability to guard accounts and interface layers. This article provides the configuration sequence and checklist.

2026-11-01

After the background style is changed, the front-end is messed up, and you should first check which layer for template changes and static files.

After the template is modified in the background, the front-end style is disordered, but the background is normal. The fault is basically in the presentation layer rather than the data layer. The troubleshooting sequence is to first locate the specific template modification, then check the path and missing static resources, and finally verify whether the site-wide replacement has mistakenly damaged the style references. The smaller the rollback range, the safer it is: if you can only roll back the template, don't touch the backup. Confirm that the backup contains static files before moving the backup.

2026-11-01

After the background login credentials are forged, what to rotate first and what to change next.

The certificate can be forged does not mean the password is guessed. AnQiCMS v3.6.6 fixes the site switching login issue, replacing the long-term valid jump ticket with a one-time ticket valid for 120 seconds, and requiring in the upgrade prompt to first rotate the signature keys of each site, and then change all administrator passwords. This article gives the handling sequence and judgment basis after discovering such problems.

2026-11-01

How to arrange the update rhythm of scheduled release, and whether it will affect the collection time of content

The scheduled release solves the stability of the update rhythm, not to make the content be indexed faster. This article explains the actual role of the time factor, the three principles of scheduling, what to check in the pending release status, and why the timeliness of new content indexing depends on the active push of links rather than waiting for crawling.

2026-11-01