0

I search a solution for this: On Google Cloud Storage bucket stored a file: /2023-2.jpg

So if browser open

xyz.com/2023-2-abc.jpg xyz.com/2023-2-cba.jpg etc.

i want to the CDN load this (not redirect): xyz.com/2023-2.jpg file

I want to reach this file with these url address regex scheme: (\d+)-(\d+)-(.*).jpg /$1-$2.jpg

Alex
  • 1
  • I am assuming from your question that English is your second language but your question does not clearly describe a problem, what you configured, or the errors. Please read this [guide](https://overflow.tips/write-good-question/) and update your question. – John Hanley Jul 16 '23 at 19:18
  • Maybe you're asking about proxy rewriting in htaccess? If so see https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p if regex works as you want then `http...googlehost/$1-$2.jpg` should be all you need.. that would defeat CDN a bit though as all traffic would route through local server not the CD network. – user3783243 Jul 16 '23 at 19:22

1 Answers1

0

Neither Media CDN nor Cloud CDN support blob matching. Wildcard matching is possible based on a directory level, which would allow for URL rewriting; however this won't allow you to extract a portion of the path value and rewrite the go forward URL path. The wildcard and variable match is an all or nothing thing at the moment.

While the documentation shared is for Media CDN, Cloud CDN can support the same wildcard pattern matching via the new Application Load Balancer (NOT the Classic Application Load Balancer) via the Envoy YAML in the URL Map.

Dave
  • 434
  • 5