Last Updated: February 25, 2016
· emincan

Redirect directory to a subdomain with htaccess

I have a real address of But when I try to embed it as video tag in, the browsers have mixed content warning. I needed to use a subdomain as a directory because of SSL. So I used this code in htaccess:

RewriteCond %{REQUEST_URI} ^/cdn
RewriteRule ^cdn/(.*)$$1 [R=301,L,P]