This configuration is designed to redirect all requests to the WordPress
uploads directory (/wp-content/uploads/
) to a specified production
Content Delivery Network (CDN). This setup helps offload static media
assets to the CDN, reducing load on the main server and improving load times.
- The
$production
variable defines the CDN URL where the assets are located. - Requests for resources within
/wp-content/uploads/
are first checked locally.