Redirect from CDN to Primary website on direct access of CDN domain?
snippet in htaccess

Redirect from CDN to Primary website on direct access of CDN domain?

user6554

RewriteEngine On
RewriteCond %{HTTP:Host} =cdn.example.com
RewriteRule (.*) http://example.com/$1 [R=301,L,QSA]