Htaccess Preventing Access To Your Php Includes Files

[Solved] Htaccess Preventing Access To Your Php Includes Files | Php - Code Explorer | yomemimo.com
Question : .htaccess Preventing access to your PHP includes files

Answered by : samer-saeid

## Enable Mod Rewrite, this is only required once in each .htaccess file
RewriteEngine On
RewriteBase /
## Test for access to includes directory
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /includes/ .*$ [NC]
## Test that file requested has php extension
RewriteCond %{REQUEST_FILENAME} ^.+\.php$
## Forbid Access
RewriteRule .* - [F,NS,L]

Source : | Last Update : Fri, 10 Dec 21

Answers related to htaccess preventing access to your php includes files

Code Explorer Popular Question For Php