01-25-2008, 12:08 AM
Hello,
I have been struggling with something and I wanted to see if anyone has any ideas if what I want to do is even possible.
I have set up an install of MyBB at http://www.studyany.com/mybb . By using .htaccess I have managed to get it so when a user types in http://www.studyany.com/mybb/tester1/index.php they also can view the same MyBB forum. The two forums, mybb and tester1 are actually running off of the same set of files. Notice that if you visit http://www.studyany.com/mybb/tester1/ you get a dir listing. Also, *most* of the links on the tester1 forum appear in the browser as leading to tester1/file rather than the actual location, mybb/file.
What I want to do is have MyBB pull up the appropriate database tables for a forum based on the URL that an individual requests via the browser. IE, typing http://www.studyany.com/mybb/tester1/index.php ideally would pull up the mydatabase_tester1 table, whereas typing http://www.studyany.com/mybb/tester2/index.php would pull up the mydatabase_tester2 table, ect, regardless of whether or not the table exists.
Another possible option I see is requesting a config.php and Settings.php from the requested directory name, instead of where the files are actually located, IE I could have no actual files in http://www.studyany.com/mybb/tester1/ but I could have an inc folder with Settings.php and config.php inside of the tester1 folder.
I've already tried messing with Mod_Alias to redirect file system requests for config.php and Settings.php but that always gives 500 server errors. I also tried messing with some other code and the MYBB_ROOT and TABLE_PREFIX defintions with no luck. If anyone has any ideas on how to accomplish I would really appreciate the input.
BMR777
I have been struggling with something and I wanted to see if anyone has any ideas if what I want to do is even possible.
I have set up an install of MyBB at http://www.studyany.com/mybb . By using .htaccess I have managed to get it so when a user types in http://www.studyany.com/mybb/tester1/index.php they also can view the same MyBB forum. The two forums, mybb and tester1 are actually running off of the same set of files. Notice that if you visit http://www.studyany.com/mybb/tester1/ you get a dir listing. Also, *most* of the links on the tester1 forum appear in the browser as leading to tester1/file rather than the actual location, mybb/file.
What I want to do is have MyBB pull up the appropriate database tables for a forum based on the URL that an individual requests via the browser. IE, typing http://www.studyany.com/mybb/tester1/index.php ideally would pull up the mydatabase_tester1 table, whereas typing http://www.studyany.com/mybb/tester2/index.php would pull up the mydatabase_tester2 table, ect, regardless of whether or not the table exists.
Another possible option I see is requesting a config.php and Settings.php from the requested directory name, instead of where the files are actually located, IE I could have no actual files in http://www.studyany.com/mybb/tester1/ but I could have an inc folder with Settings.php and config.php inside of the tester1 folder.
I've already tried messing with Mod_Alias to redirect file system requests for config.php and Settings.php but that always gives 500 server errors. I also tried messing with some other code and the MYBB_ROOT and TABLE_PREFIX defintions with no luck. If anyone has any ideas on how to accomplish I would really appreciate the input.
BMR777