This is a simple solution without editing the .htaccess file.
Create a new index.html or index.php file in your folder and write these line on the body.
In PHP:
<?php
header("Location:../index.php");
?>
In HTML:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=http://www.yourDomainName.com">
<script language="javascript">
window.location.href = "http://youDomainName.com"
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow the <a href='http://www.yourDomainName.lk'>link to Your domain name home page</a>
</body>
</html>
From this way you can block
www.yourDomain.com/img
folder
www.yourDomain.com/css
folder and other folders you wish to deny access easily. I don't know still can hackers bypass this files but this is the simple solution. Try this and see the answers for yourself.