1) There should be only ONE config.php at the root directory of the website. Why have a separate one for the admin directory that has some duplicated code in it?
2) Make the admin/ path a variable in config.php.
The vendor of this forum software, phpBB, is currently doing it that way.
I know it is easier said than done, but it should be done - seriously. That way there won't be a need for an admin config and the owner can easily change the variable for the path and then rename the admin folder to w/e he wants.
And I already know that someone will protest and argue that it is already easy to rename the admin directory. Well, it can become easier.
And I already know that someone will protest and say that bots knowing the admin path is not a security risk blah blah because the platform is very secure blah blah. Well, this extra layer of security does not hurt, right? And like good passwords cannot be bruteforced, if you use a good name for the admin directory then bots will not find it.
OpenCart's a little different in that the administration and storefront are decoupled from each other. They're essentially two apps connected by a database. To make them work off one config you would need to either merge the two apps or rework OpenCart's framework (see action.php and loader.php).Louis7777 wrote:1) There should be only ONE config.php at the root directory of the website. Why have a separate one for the admin directory that has some duplicated code in it?
That one is already in place. See the HTTP_SERVER, HTTPS_SERVER, and DIR_APPLICATION constants in the config file.2) Make the admin/ path a variable in config.php.
-Ryan
Who is online
Users browsing this forum: No registered users and 9 guests