Answer the question
In order to leave comments, you need to log in
How to disable direct access to the script?
How to correctly prohibit access to .php files from the address bar, with the ability to set
Allow exceptions
/index.php
/login.php
/xml_rpc/server.php
/system/contact/view_all/
/system/home/index/
/system/home/*.php
/system/controllers/contact_controller.php
Answer the question
In order to leave comments, you need to log in
Configure mod_rewrite so that one script responds to all requests, which will implement the desired logic.
And so I will join the previous speaker, the system in which the solution of such problems is required, most likely, is not very well designed.
As Leonid Sysoletin said , set up mod_rewrite, and in that one script that processes all requests, write something like define('SOMEVARIABLE', 'VALUEOFSOMEVARIABLE');
A in all other scripts, write something like the following at the very beginning
<?php defined('SOMEVARIABLE') or die('No direct script access.');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question