XF 2.0 Moving to local testing, but redirected to domain

Gael56

Member
Hi,

I installed XenForo on my local server for testing (no problem, i can access it).

Then, I import my database from my website. But when I try to connect, I'm redirected automatically to the online site (localhost/forum / ---> mydomain.tld).

I can't access to my local admin panel :unsure:

I searched in my local database (in the table xf_option), but I can not find it.

Cache is cleared, src/config.php is ok

An idea?
Thank you
 
If you can't access your XF admin control panel, then the redirect is happening outside of XF. At a guess, you've added some sort of canonicalization rules to the .htaccess file.
 
Worst case, when you want to view the test install rather than the live domain, add the following to your Windows or Linux "hosts" file:

localhost mydomain.tld

This will make your browser see your local setup as mydomain.tld
 
Just for future reference to new readers.

I had the same problem and it confused me why this happened. I figured it out thanks to Mike's hint.

If you enable this in XF:
201899

Then it redirects also localhost to your board's url automatically. You have to login to your ACP in localhost and disable it. localhost/admin.php
 
Top Bottom