MyBB Tutorials

How to change the name of config.php

Submitted by Aoki, , Thread ID: 37

Thread Closed
15-01-2015, 07:01 AM
#1
This little trick adds some extra security to your board.
Change the name of config.php to anything you want. In this tutorial I'm going to name the config "securedconfig.php".

Now, in config.php, put this:

Code:
<?

if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {

  exit('Denied.');

}

@include('yournewconfigname.php');

In "securedconfig.php" put the old content of your old config.php
That's it!

RE: How to change the name of config.php

#2
Sadly this no longer works for me, trying to figure out why.

RE: How to change the name of config.php

#3
Still works, thanks.

Users browsing this thread: 1 Guest(s)