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

XF 1.4 Local copy redirects to domain

Discussion in 'Troubleshooting and Problems' started by MS1, Oct 7, 2015.

  1. MS1

    MS1 Member


    currently I'm using xenforo version 1.4.5 and I want to update to 1.5!
    Therefore I downloaded all my files from the server (also the database from the server) to create a local copy.
    For testing purposes I want to update xenforo on my local machine (XAMPP) - then I can see if there are any issues.

    Unfortunately I get redirected to the "real Live Site" if I open the localhost/mylocalcopy path.
    I deleted the htaccess file but the issue is still there.

    Any hints?

    Best wishes

  2. andybond

    andybond Active Member

    check your config.php in the library folder .

    I assume everything else is "offline?"
  3. MS1

    MS1 Member

    $config['db']['host'] = 'localhost';
    $config['db']['port'] = '3306';
    $config['db']['username'] = 'root';
    $config['db']['password'] = '';
    $config['db']['dbname'] = 'mydb';
  4. andybond

    andybond Active Member

    That looks about normal.

    I assume if you post on the offline site it somehow doesnt automagically post to the online site ?
    MS1 likes this.
  5. MS1

    MS1 Member

    That's my problem! I can't even analyse any of these things, because I get directly redirected to the online site.
    It's like there is somewhere still an htaccess redirect?!
  6. Snog

    Snog Well-Known Member

    Log in to localhost/mylocalcopy/admin.php and change the Board URL and if set, the Home Page URL to your localhost path.

    Those values are sending you to your live site.
  7. MS1

    MS1 Member

    That's what I tried.
    But unfortunatly I also get directly redirected to the live site... that's so strange!
  8. MS1

    MS1 Member

    Can I change them directly in the database of my local copy?
  9. andybond

    andybond Active Member

    You havent got a hosts entry that points from to your domain have you ?
  10. Brogan

    Brogan XenForo Moderator Staff Member

    The board URL is not related to that so wouldn't make any difference when navigating to the localhost site.

    To be clear, what URL are you accessing in your browser?
    Something like: http://localhost/mysite ?

    If so, and that is automatically redirecting to the live site, check the .htaccess file in the install root directory and the hosts file as mentioned above.
    If it's none of those then try force clearing your browser cache (although I doubt that is involved).
    MS1 likes this.
  11. MS1

    MS1 Member

    I develop a lot of scripts and pages with XAMPP and don't have problems (there is no redirect when I navigate to these folders or files)
  12. Jeremy P

    Jeremy P Well-Known Member

    @MS1 Have you tried in a different browser, or cleared your cache? I suspect it was the .htaccess file, but now your problem is Chrome (and probably others) cache redirects.
    MS1 likes this.
  13. MS1

    MS1 Member

    The cache was the problem - I didn't knew the browser cache also contains htaccess-files! I cleared it -> now everything works great.

    You have helped me a lot!

    andybond likes this.

Share This Page