Trying to set a test board

Discussion in 'XenForo' started by southernlady, Dec 19, 2018.

  1. southernlady

    southernlady Coder/Designer

    2,370
    722
    +156
    I have a domain I use for testing and make the board password protected since it isn't the domain in my license.

    Live site is abc.org Test board is xyz.net
    Okay, copied over the live board after temporarily taking it offline and changing the board url in the ACP/Options/Board Information to xyz.net. Then copied it. Once copied, the live board got changed back and active again.

    But every time I try to go to the site, it automatically redirects me to the live board. SOMETHING in the file is doing that. Any clues? If I hover over the admin.php, it shows abc.org even while located on xyz.net

    I've gone round and round in circles. I prefer not to actually use abc.org cause I am afraid I would change something on the live board and I am trying to get it ready for going from 1.5X to 2.0X. I have a boatload of extra files on my ftp site and I need to do a comparison of unused add ons and get them off my ftp.

    I've searched here and the only part I've seen is the ACP>Options>Basic Board Information area.

    I do have a clean install of XF on xyz.net and it works fine.

    It's something buried in the files I copy over. I've checked the .htacess in the root of my xyz.net domain...and in the other two places I found it. None of them mention abc.org.

    Help.
     
  2. Ingenious

    Ingenious Fan

    618
    347
    +186
    Do you mean you can get to xyz but every link in the cloned forum is for abc? Or that trying to get to xyz just diverts you to abc?

    The first would suggest your server set up is fine but some option in XF is wrong (though you updated board info, what about config.php, did you update with the new database info?).

    The second would suggest some server setting is wrong or there is still some rewrite in .htaccess.

    From the XF info:

    "6. How can I move my installation to a different domain or host?
    Backup the existing database and server files. Copy them to the new domain/server and update the library/config.php file with the new database details as required. It may be necessary to set permissions for the data and internal_data directories to world writeable (CHMOD 0777). Lastly, update the Board URL in the ACP -> Options -> Basic Board Information, if it has changed.
    Note that if you are moving to a different type of web server and have Friendly URLs enabled, you will need to make the appropriate changes. Refer to the Friendly URLs section of the XenForo Manual for more details.
    Note also that redirection will be required if the domain name changes, to ensure any indexed links continue to work. Furthermore, if you have redirection scripts in place, you will need to edit the 301config.php file to reflect the new location."

    It's probably something simple, just finding it is the problem ;)
     
  3. southernlady

    southernlady Coder/Designer

    2,370
    722
    +156
    I can get to xyz but it redirects immediately to abc.

    There is something in what I copied that’s sending it there. ABC.org also has abc.com and abc.net and on that domain only, .com and .net are set up to immediately redirect. But that’s on the cpanel. Once copied over to xyz, it shouldn’t still be doing it.
     
  4. we_are_borg

    we_are_borg Administrator

    4,986
    1,387
    +1,958
    Did you alter the site settings on xyz.net if that is still set to your live board it will redirect you. You'll need to login into the admincp of xyz.net and set the correct url.
     
  5. southernlady

    southernlady Coder/Designer

    2,370
    722
    +156
    I understand that but it won't stay on xyz long enough for me to get there. Also, when I click on xyz.net/admin.php, it jumps to abc.org admin panel
     
  6. we_are_borg

    we_are_borg Administrator

    4,986
    1,387
    +1,958
    Do you have an .htaccess at xyz.net that rewrite the domain so www.normaldomain.tld becomes normaldomain.tld anything that alters the domain in .htaccess.
     
  7. southernlady

    southernlady Coder/Designer

    2,370
    722
    +156
    I'm looking now. Wiscp is hunting all the .htaccess files on xyz so I can check all of them
     
  8. southernlady

    southernlady Coder/Designer

    2,370
    722
    +156
    Okay, on xyz.net, I found at least one that's cause this:

    Code:
    #Redirect HTTP to HTTPS
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    #    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
    
    RewriteCond %{HTTP_HOST} !^abc\.org
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule ^(.*)$ http:/abc.org/$1 [L,R=301]
    
        #    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
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
        RewriteRule ^.*$ - [NC,L]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
    
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php72” package as the default “PHP” programming language.
    <IfModule mime_module>
      AddType application/x-httpd-ea-php72 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
    
    The redirect was generated from the cPanel of abc.org and just copied over.
     
  9. southernlady

    southernlady Coder/Designer

    2,370
    722
    +156
    The rest just read:

    Code:
    Order deny,allow
    Deny from all
     
Verification:
Draft saved Draft deleted
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.