Text v Expression Editor:
http.request.uri.path ~ "^/images/[^/]+/[^/]+/[^/]+$"Text za Cesta > Přepsat na > Dynamický:
regex_replace(http.request.uri.path, "^/images/[^/]+/[^/]+/(.+)$", "/img/${1}")← Cloudflare Rules / rules / transform / examples
Chcete-li přepsat cesty jako /images/<FOLDER1>/<FOLDER2>/<FILENAME> , kde <FOLDER1>, <FOLDER2>, a <FILENAME> se může lišit, až do /img/<FILENAME>, vytvořte pravidlo přepisu adresy URL s dynamickým přepisem složky cesty:
Text v Expression Editor:
http.request.uri.path ~ "^/images/[^/]+/[^/]+/[^/]+$"Text za Cesta > Přepsat na > Dynamický:
regex_replace(http.request.uri.path, "^/images/[^/]+/[^/]+/(.+)$", "/img/${1}")Toto pravidlo by například přepsalo /images/nature/animals/tiger.png cestu k /img/tiger.png.