I am trying to prevent the direct access to my website resources using htaccess.My website is orlandojoes.co.uk/clouds which is a subfolder.But if i enter orlandojoes.co.uk/clouds/css/style.css in the address bar i can see them.But i want to prevent seeking them and redirect to index.html.
I am trying:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?orlandojoes.co.uk\.ltd [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?orlandojoes.co.uk\.ltd.*$ [NC]
RewriteRule \.(gif|jpg|js|txt|css)$ /HeyManYouHaveComeToAwrongPlace;) [L]
But it blocks all.Even in index.html page show only markups not with stylings. What can be a solve?
www.orlandojoes?co?uk.ltd- where ? is any character - I think you need to check the RewriteCond syntaxstyle.cssbut i want them not to access into the file