GetSimple Support Forum
Hide gsconfig ? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11)
+--- Thread: Hide gsconfig ? (/showthread.php?tid=8556)



Hide gsconfig ? - ferby - 2016-07-07

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...


RE: Hide gsconfig ? - D.O. - 2016-08-11

Interesting: just another way to say " can't load this page" Wink


RE: Hide gsconfig ? - shawn_a - 2016-08-11

i cant see why not


RE: Hide gsconfig ? - ferby - 2016-08-15

(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