I was wondering what is the best way you would deny public access to a folder, but other files on the server can access it? 

For example, my templates and scripts I've paid for

```
 public/template/header.html
 public/template/paidscript.js

```

I don't want anyone to access files inside of template folder, but

```
 public/folder/index.php 

```

and the index.php can have this code inside

```
<?php include (../tempalte/header.html);
include (../tempalte/paidscript.js);  ?>

```

and any other files on the server can access it.