1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Map subdomain to url..

Discussion in 'XenForo Questions and Support' started by BlackMuddler, Mar 5, 2011.

  1. BlackMuddler

    BlackMuddler Active Member

    Maybe I ask the question wrong - but here what I want.

    On my site I now have some 'big' add-ons installed. They all have url:


    and so on.. Some of them are more important than others and for these, I will have subdomain. Eg for forum have forum.domain.net and wiki have wiki.domain.net

    So I wish to give members the opportunity to enter url http://wiki.domain.net and land on http://www.domain.net/wiki in browser.

    How do I resolve this is best and what is possible. best practice?

    I have all the necessary access to dns, webserver etc. so please shot on me..

    Thanks in advance
  2. BlackMuddler

    BlackMuddler Active Member

    Ok ..

    Got it to work - Right now my wiki and forum subdomain part is sync on dns and later also chat .. If you want to test:

    http://wiki.danskhandicapforum.dk goes to directly to my wiki part and
    http://forum.danskhandicapforum.dk goes directly to my forum part..

    Now - whether it is the right way to do it must be unsaid - but it works for me. It would probably be more correct with an a-record to a directory on the webserver and so in this directory have some info in a .htaccess or html/php file to redirect. It is beyond my knowledge to find out.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It is best to enforce just one URL per page for cookie reasons. The default cookie settings will not allow the login cookie to cross subdomains, so you can get a situation where users have to login twice, once for each URL.

    You can setup a simple redirect where sub.domain.com redirects to domain.com/sub. That way no matter what URL they use to access the page they will end up on the same URL.

    Is there a functional reason why you are using subdomains? If it's just for URL aesthetics then it might be best to avoid having multiple subdomains for the forum.

Share This Page