I'm using Apache HTTPD server and I have a 3 static folders on my root, namely "css", "js" and "images". How do I rewrite it so that it can't be seen from the outside world? I know they're static resources and should be seen by the world but I have some configurations in place where they are replaced by CDN urls on my site.
So what I want to do is make requests to these paths a 404. I currently have this code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/?(css|js|images)/
RewriteRule ^/?(.*)$ - [G]
G for gone, and I've tried F for forbidden too. But all I want is a 404. The second thing is, if you type www.domain.com/css, it redirects/resolves to www.domain.com/css/ and gives the gone message. I simply dont want to give the inquisitive user a clue that the folders are there.
Thanks.