GetSimple Support Forum

Full Version: Hide gsconfig ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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? :

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...
Interesting: just another way to say " can't load this page" Wink
i cant see why not
(2016-08-11, 01:48:36)D.O. Wrote: [ -> ]Interesting: just another way to say " can't load this page" Wink

Not just that. It attempts to hide the file.

(2016-08-11, 10:05:59)shawn_a Wrote: [ -> ]i cant see why not

Thanks! Smile