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

Subdomains and Xenforo

Discussion in 'XenForo Development Discussions' started by Marcus, Nov 12, 2012.

  1. Marcus

    Marcus Well-Known Member

    My movie forum (example) gets some subdomains:

    movie.com which displays all forums
    horror.movie.com which displays the general forums and the horror forums

    Every thread and every forum only belong to one "subdomain" to avoid redundant links. When a user visits a horror movie thread he will be redirected to horror.movie.com/threads/324 if he came from movie.com. If the user accesses the same thread from horror.movie.com the thread will be displayed and he will not be redirected. From a programmers perspective every forum is targeted with a subdomain or with being a general forum (no subdomain)

    ControllerPublic/Index will check the subdomain (horror.movie.com or movie.com) and manipulates the forum list to either only display horror movies (along with the general forums) or display everything when accessed from movie.com

    ControllerPublic/Forum will 1. check the database and manipulate the thread target url (adds "horror." to some threads) and when accessed from movie.com/forums 2. checks against being accessed within the right subforum and if not it will send out a redirect to display the forum on horror.movie.com/forums

    ControllerPublic/LinkForum same as Forum

    ControllerPublic/Thread will check the database and do the same as for the ControllerPublic/Forum. And of course do something within the models like: getThreadRedirectById

    ControllerPublic/Post same as Thread

    Are there cookie problems and other things to care about?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Marcus likes this.

Share This Page