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

XF 1.5 Moving Xenforo Folder

Discussion in 'Installation, Upgrade, and Import Support' started by Saburov, Oct 6, 2016.

  1. Saburov

    Saburov Active Member

    In the future I want to use Xenword. So I think I should move xenforo folder already for the SEO. I may be late after.

    Is there any guide for moving xenforo folder?

    What do you sugguest for the adress of the forum. forum.mysite.com or www.mysite.com/forum ? Which one is better for seo or another stuff?

    Thanks.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Saburov

    Saburov Active Member

    Should I move .htaccess file to new folder or it is belong to root?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Depending on your set up, you may have multiple .htaccess files in the root and other directories.
     
    Saburov likes this.
  5. Saburov

    Saburov Active Member

    I'm asking about .htaccess file which you mentioned in FAQ.

    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/$
    RewriteRule (.*) /community/ [R=301]
    Should this line exist in root .htaccess or forum directory .htaccess?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    It depends where you are moving the installation from and to.
     
  7. Saburov

    Saburov Active Member

    I moved xenforo from root to /forum directory. So I add this lines to the .htaccess

    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/$
    RewriteRule (.*) /forum/ [R=301]
    But I couldn't figure out where should I locate this .htaccess file. Root or /forum directory?
     
    Last edited: Oct 6, 2016
  8. Saburov

    Saburov Active Member

    I moved xenforo from root to /forum directory and after

    I added these lines below the regular .access file of the xenforo and locate the root directory:

    But my google searchs, I can't get any redirection. I'm getting this error:

    Not Found
    The requested URL /index.php was not found on this server.

    ( http://www.muhasebecafe.com/threads/teos-6-bolum-soru-ve-cevaplar.11/)


    I need to redirect my old posts to forum.muhasebecafe.com and www.muhasebecafe.com/forum/ directory

    Like this:

    http://www.muhasebecafe.com/forum/threads/teos-6-bolum-soru-ve-cevaplar.11/
    http://forum.muhasebecafe.com/threads/teos-6-bolum-soru-ve-cevaplar.11/

    I failed to redirect.
     
    Last edited: Oct 6, 2016
  9. Optic

    Optic Well-Known Member

    Choose only one, you can't have both because users will get logged out and also Google will see both URLs as separate sites.

    I used a variation of this:

    Code:
    RewriteRule ^(members|threads|posts|attachments|profile-posts|forums)/(.*)$ /forum/$1/$2 [R=301,L]
    Code:
    RewriteRule ^(members|threads|posts|attachments|profile-posts|forums)/(.*)$ http://forum.muhasebecafe.com/$1/$2 [R=301,L]
     
    Saburov likes this.
  10. Saburov

    Saburov Active Member

    I add your line but still doesn't work optic. Now I have this lines in my root folder .htaccess file (not in forum/ directory) but it doesn't work.

    Code:
    #    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 405 default
    ErrorDocument 406 default
    ErrorDocument 500 default
    ErrorDocument 501 default
    ErrorDocument 503 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>
    
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/$
    RewriteRule ^(members|threads|posts|attachments|profile-posts|forums)/(.*)$ http://forum.muhasebecafe.com/$1/$2 [R=301,L]
     
  11. Saburov

    Saburov Active Member

  12. Saburov

    Saburov Active Member

    And I have additional two questions:
    1. still forum.muhasebecafe.com and www.muhasebecafe.com/forum works when I enter the adress bar. Should I disable one of them and how? is Google still see both URLs as separate sites?
    2. I'm planning to install wordpress to the root folder. What should I do wordpress's .htaccess file? Could it be a conflict?
     
  13. Optic

    Optic Well-Known Member

    Try moving:
    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/$
    RewriteRule ^(members|threads|posts|attachments|profile-posts|forums)/(.*)$ http://forum.muhasebecafe.com/$1/$2 [R=301,L]
    To the top of the .htaccess file (not the bottom)
     
  14. Saburov

    Saburov Active Member

    not working :/
     

Share This Page