MyBB Community Forums

Full Version: How do i use both domain and subdomain to access my forum ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Heeeeello ! Smile

First of all : My forum

Test account : 
  • User name : Test
  • Password : 123456Ab

I upgraded from 1.6.whatever to 1.8.7 a few days ago, and everything was working fine.

Until now, I was using a temporary domain to test my forum, but now I've put it on its very own domain : egides.com

The URL to the forum is egides.com/forum, as i intend to create a website on egides.com. I've also created a subdomain (forum.egides.com) that directly redirects to egides.com/forum. My redirections are made by DNS, I haven't edited the .htaccess at all.

So in my settings (both the file and admin panel), i have the following :



settings.php is CHMOD to 666 and i have cleaned my cookies, and even tried it on different browsers.



My problem :
  • If I access the forum via egides.com/forum, the forum is properly displayed and i can login without any problem.
  • If I access the forum via forum.egides.com, the forum is properly displayed BUT i can't login at all. If I try to, it just stay on the login page, as a guest, without any information (same as when you have wrong cookies settings).
Any idea of what i did wrong please ? I'm a bit at a loss. Smile
if you want to use forum.ediges.com as your forum url then you can use below settings
board url => http://forum.ediges.com
cookie domain => forum.ediges.com
cookie path => /

first you can change the settings in ~/inc/settings.php file and then at Site Details of forum admin panel.
Hello .m. and thank you for your answer !

I did what you say, but sadly it just reverted the problem.
Now i can login if I access the forum using forum.egides.com, but i have the cookie problem when accessing the forum using egides.com/forum.

What I'd like is to be able to login no matter what URL i use. Is it possible ?
You need to define 2 cookie settings, but i doubt its possible. Wait for the guy to reply
actually its better to redirect sub-forum url to sub-domain url.
web host panel should be having redirect facility.

or you can try using this plugin => ABP Multi Domain
The redirect facility of my host allows me to redirect a domain or subdomain to a folder, but not the opposite (At least, as far as i know, but maybe I'm blind and/or stupid Big Grin).

I solved the problem by using the following lines in .htaccess :

RewriteEngine On 
Redirect permanent /forum http://forum.egides.com

It seems to work like a charm, no matter which URL or subdomain i use : Everytime I try to access "forum" folder, it redirects me to "forum" subdomain.

Thank you both for your time and answers ! Smile
No problem, cheers.

Yes that would work, but in future you may face some cookie related issue on your site, not sure what or when. good luck and keep us updated in case you face any issues!