The idea is to serve js,css, img files using different domains so I created following domains:
- css.mydomain.com
- js.mydomain.com
- img.mydomain.com
The main site URL is www.mydomain.com. When I access the site throw main URL every img,css,js files are delivered to user throw subodomains. And that everything works fine.
PROBLEM IS that I can access main site using one of domains css.mydomain.com, js.mydomain.com, img.mydomain.com
AND I want is to deny every request that is not js, css, img file type.
How can I do this over htaccess?