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

Implications of running xenforo from a subdirectory (ie. /community or /forums )

Discussion in 'General XenForo Discussion and Feedback' started by Digital Doctor, Dec 30, 2010.

  1. Digital Doctor

    Digital Doctor Well-Known Member

    Information is Power.
    Help the newbies !

    Could the mods/devs/everyone please use this thread to detail the implications of installing xenforo in subdirectory ? (as opposed to installing it in the root directory).

    Information and Implications of installing Xenforo in a subdirectory

    (1) Don't install to /forums subdirectory ?
    If you do ... your site will have urls like www.mysite.com/fourms/forums - [source]
    Note: It appears that xenforo.com itself installed xenforo in a subdirectory called /community

    (2) URLs in Xenforo.
    When your users are on a page or forum or thread, xenforo adds that to the URL.
    /forum - when in a forum
    /thread - when reading a thread
    /pages - when on a page Q: What is a "Page" ?
    /post - when posting

    /members - member's Tab
    /help - Help Tab
    /account - Account Preferences - http://xenforo.com/community/account/preferences
    /watched - watched threads - http://xenforo.com/community/watched/threads
    /search - Search - http://xenforo.com/community/search/?type=post

    Takehome message: Most people should install xenforo in a subdirectory called /community - just like xenforo.com did.

    (3) If you want other software installed (Wordpress, a CMS, etc.) on your site, you should install xenforo to a subdirectory.
    - this avoids clashes with other software's index.php :) [source]

    (4) It might help with /mod rewrites ? (researching this).

    How to move your xenforo install from the root directory to a subdirectory

    Pretty easy ! Also discussed here.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    This has been discussed before but essentially, if you plan to install any other software such as a CMS, or even have a home page, you will not be able to have 2 index.php (or admin.php) files in the root.
    For that reason, your forum will have to be in a sub-directory.

    I'll see if I can locate the earlier thread which discussed this.
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

  4. FredC

    FredC Well-Known Member

    Your slipping Brogan.. Time to install more RAM.. ;)
     
  5. Digital Doctor

    Digital Doctor Well-Known Member

    Putting that in the Xenforo installation instructions could help save some future headaches. Is it in there already ?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    This is not something that's unique to XenForo.
    It applies to any software which has an index.php, or files with the same name as other software which could be installed.
     
  7. Digital Doctor

    Digital Doctor Well-Known Member

     
  8. Digital Doctor

    Digital Doctor Well-Known Member

  9. Digital Doctor

    Digital Doctor Well-Known Member

  10. UEG Immunity

    UEG Immunity Member

    how do i make it so when i go to my website it'll redirect me to the forums and where in the ACP if i need to use it
     
  11. Digital Doctor

    Digital Doctor Well-Known Member

  12. UEG Immunity

    UEG Immunity Member

  13. Digital Doctor

    Digital Doctor Well-Known Member

  14. UEG Immunity

    UEG Immunity Member

    here go to my website http://ueg-immunity.com/ and you have to click on community in order to go to the forums how do i make it so it automatically redirects to the forums
     
  15. Digital Doctor

    Digital Doctor Well-Known Member

    Do you have a file called .htaccess in the root directory ?
    I assume you are on an apache web server ?

    heh.
    I see you are.

    Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.6 Server at ueg-immunity.com Port 80
     
  16. UEG Immunity

    UEG Immunity Member

    no i only see htaccess.txt is that the same thing
     
  17. Digital Doctor

    Digital Doctor Well-Known Member

    No.
    Looks like someone edited the file in Notepad and the name changed.
    http://www.javascriptkit.com/howto/htaccess.shtml

    Open that file and paste the content here.
     
  18. UEG Immunity

    UEG Immunity Member

    #Mod_security can interfere with uploading of content such as attachments. If you
    #cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #SecFilterEngine Off
    #SecFilterScanPOST Off
    #</IfModule>

    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default

    <IfModule mod_rewrite.c>
    RewriteEngine On

    #If you are having problems with the rewrite rules, remove the "#" from the
    #line that begins "RewriteBase" below. You will also have to change the path
    #of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
     
  19. James

    James Well-Known Member

  20. UEG Immunity

    UEG Immunity Member

    i just want my website: ueg-immunity.com to redirect to ueg-immunity.com/community/index.php
     

Share This Page