Instead of showing "You cannot load this page directly." when a user attempts to visit the gsconfig file, is it ok to edit that part of gsconfig.php to this? :
Is that code safe and correct? I don't want to introduce any problems...
Code:
/** Prevent direct access */
if (basename($_SERVER['PHP_SELF']) == 'gsconfig.php') {
header('Location: http://mysite.com/404/');
die();
};
Is that code safe and correct? I don't want to introduce any problems...