tencent cloud

Content Delivery Network

Updates and Announcements
Release Notes
Announcements
User Tutorial
Product Introduction
Product Overview
Strengths
Use Cases
Term
Use Limits
CDN Performance Descriptions (Spot-check)
Purchase Guide
CDN Purchase Guide
ECDN Purchase Guide
Getting Started
Configuring CDN from Scratch
Adding Domain Names
CNAME Configuration
Domain Name Ownership Verification
FAQs about Domain Name Connection
Configuration Guide
Domain Management
Domain Name Configurations
Statistical Analysis
Purge and Prefetch
Log Management
EdgeOne
Service Query
Offline Cache
Permission Management
Permission Configuration
Console Permissions
Activate Real-time Logging as Sub-account/Collaborator
Use Cases
Accelerating Resources on COS with CDN
Practical Tutorial
Guide to Using the EdgeOne Tool for Migrating Content Delivery Network (CDN) Related Services
CDN - CVM
CDN - COS
Configuring CNAME via DNSPod
Regularly Storing CDN Logs
API Documentation
History
Introduction
API Category
Content Management APIs
Real-time Log APIs
Service Query APIs
Data Query APIs
Making API Requests
Log Query APIs
StopCdnDomain
Configuration Management APIs
Obsoleted APIs
Other APIs
Data Types
Error Codes
FAQ
Features
Billing
FAQs about Domain Name Connection
Cache Configuration FAQs
Purge and Prefetch
Statistical Analysis
FAQs about HTTPS
Connection
Errors
Troubleshooting Methods
Status Codes and Solutions
Node Cache Inconsistency
Slow Access Speed After CDN Activation
Low Traffic Hit Rate
404 Status Code
Page Display - CORS error
Resource Cache Failure
Service Level Agreement
Glossary

Access URL Rewrite Configuration

PDF
Focus Mode
Font Size
Last updated: 2024-12-30 21:36:50

Configuration Overview

If you need to modify the actual access URL to the URL that matches the origin server, you can use the access URL rewrite configuration in Tencent Cloud CDN.
You can customize the access URL rewrite configuration to redirect 302 URLs to the specified URL.

Configuration Guide

Viewing configuration

Log in to the CDN console, select Domain Management on the left sidebar, click Manage on the right of a domain name to enter its configuration page, and open the Cache Configuration tab to find the Access URL Rewrite Configuration section.
Access URL Rewrite Configuration is disabled by default.



Adding rules

You can click Add Rewrite Rule to add rules as needed.


Configuration limitations
Each domain name can have up to 100 rewrite rules.
You can adjust the priority for multiple rules. Rules at the bottom of the list have higher priority.
Current URL: starting with /; supporting full-path matching (e.g., /test/a.jpg) and wildcard () matching (e.g., /test//.jpg). If you want to specify a file directory, you cannot end the path with / (e.g., /test).
Target Host: it is the current domain name (starting with http://) by default. It can be modified to other domain names starting with http:// or https://.
Target Path: starting with / (e.g., /newtest/b.jpg); the wildcard * can be captured with $n (e.g., if n=1,2,3… then /newtest/$1/$2.jpg). If you want to specify a file directory, you cannot end the path with / (e.g., /test).
Up to 5 * and 10 $n are supported.
The content can contain up to 1,024 characters and Chinese characters are not supported.

Configuration Samples

If the Access URL Rewrite Configuration of the acceleration domain name www.test.com is as follows:


Then the actual access will be as follows:
A client requests www.test.com/test/a.jpg and the CDN node returns www.test.com/newtest/b.jpg.
A client requests www.test.com/test/a.png and the CDN node returns www.newtest.com/newtest/a.png.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback