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!

RE: How to change the name of config.php

HaVoK
Member
Level:
1
Reputation:
7
Posts:
160
Likes:
91
Credits:
117
05-02-2016, 08:05 PM
#2
Sadly this no longer works for me, trying to figure out why.

RE: How to change the name of config.php

Finn
Root@NBB:-$
Prime
Level:
1
Reputation:
11
Posts:
113
Likes:
5
Credits:
0
06-02-2016, 11:06 PM
#3
Still works, thanks.

Users browsing this thread: 1 Guest(s)