1

i got folder called recordings on my server and i want to block access from anyone to it and its content and at the same time i want the ability to call the files inside the folder from other pages i tried htaccess rule

Options -Indexes 

its just block access to the folder but when i write specific file inside the folder the browser open it and i do not want that and i tried another htaccess rule :

deny from all 

but it make me not able to call the files on other pages and i want to be able to call them so can anyone help me ?

1 Answer 1

1

Use below rule,

<Files ~ "*.php"> order deny,allow deny from all allow from 127.0.0.1 </Files> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.