Join WhatsApp ChannelJoin Now

Access File Extension Htaccess Deny Example

Hi Dev,

Today, i we will show you access file extension htaccess deny example. This article will give you simple example of access file extension htaccess deny example. you will access file extension htaccess deny example. In this article, we will implement a access file extension htaccess deny example.

So let’s follow few step to create example of access file extension htaccess deny example.

Example 1

RewriteEngine On
  
RewriteRule ^uploads/.*\.(php|rb|py)$ - [F,L,NC]

you can not access following files:

/uploads/test.php
/uploads/demo.php
/uploads/test2.php

Example 2

you can not access php, rb, py files inside that folder:

<FilesMatch "\.(?:inc|php|py|rb)$">
Order allow,deny
Deny from all
</FilesMatch>

you can not access following files:

/test.php
/uploads/demo.php
/uploads/test2.php

I hope it will assist you…

Recommended Posts