Host file, HTTPS and database

Hi there,

I am previewing my website by modifying my hosts file using the following line:

xxx.xxx.xxx.xx website.com

The current website is still live and uses HTTPS.

I am having an issue previewing it when I connect to a database. If I use incorrect database details, I get a database connection error which is sort of OK as it means its displaying the new website using the host file. If I connect successfully, it then redirects to the HTTPS live site.

Any ideas why it’s redirecting to the live site if the database connection is successful?

I’m using WordPress if that makes a difference.

Thanks.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.