- go then htaccess.net.ru and start reading! - Palmervan
|
2 answers
<FilesMatch "config.php"> Order Deny,Allow Deny from all </FilesMatch> denies access to the config.php file
<FilesMatch ".(gif|jpe?g|png)$"> Order Deny,Allow Deny from all </Files> ban on pictures
- It works, but not correctly. Now does not open normal pages. site.com/page - Oleg
- 2If you prohibit pictures, they will not be displayed on the page, will it? - Zowie
- I banned php - Oleg
- 6You have forbidden to open pkhp and are surprised that pkhp does not open? Enchanting. - Sh4dow
- :) - Damon
|
I need to forbid a direct call to php, and allow the call via include.
.htaccess does not help here.
Need something like:
index.php :
$GLOBALS['_INC_OTHER'] = 1; include('other.php'); other.php :
if (empty($GLOBALS['_INC_OTHER'])) exit; As a result, the file other.php can only be connected via index.php.
- This I knew, was looking for another, simpler way. - Oleg
- I'm afraid that you will not find anything simpler - Alex Kapustin
|