MyBB Tutorials

How to change the name of config.php

Submitted by Aoki, , Thread ID: 37

Thread Closed
Aoki
retired
Level:
83
Reputation:
348
Posts:
7.89K
Likes:
2.3K
Credits:
1.7K
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!

Users browsing this thread: 1 Guest(s)