Skip to content

Commit 52dd5ca

Browse files
committed
Simplify custom CDN domain
1 parent e62e2d8 commit 52dd5ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/cloud/redirects.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ Similarly, you can serve user uploads from a secondary domain or subdomain:
113113
rewrites:
114114
- pattern:
115115
hostname: 'cdn.mydomain.com'
116-
pathname: '/assets/:assetPath+'
117-
destination: '{assetBaseUrl}/{matches.pathname.groups.assetPath}{request.url.search}'
116+
destination: '{assetBaseUrl}/{request.uri}'
118117
```
119118

120119
With this strategy, your files are still stored on (and available from) our CDN—all we’ve done is create an alias for the canonical CDN URL. Craft continues to generate canonical URLs for assets to ensure that they resolve, independent of rewrite configuration, unless you [explicitly set a custom URL](assets.md#custom-urls).

0 commit comments

Comments
 (0)