skip to Main Content

I am moving a website from one host to another. It is club website that has been handed from member to member for 10 years to look after so a bit of a mess with wordpress files in the directory but (I am assured) it does not use any of these. From what I can see it is a really simple html site so I just copied ALL files from the public_html folder across to the new cpanel server and updated the DNS.

On desktop browser: example.com redirects to example.com/index.html and loads fine

On mobile device: example.com shows Error Establishing a Database Connection

If I navigate to example.com/index.html on mobile the page loads fine.

I believe that example.com should redirect to example.com/mobile/index.html when using a mobile device. If I navigate manually to example.com/mobile/index.html on my mobile the page loads fine.

Somewhere it is trying to do the redirect when using a mobile device and hitting a file that tries to connect to a database, but I do not understand where or how it is doing this.

2

Answers


  1. 1). Check the .htaccess file: Look for an .htaccess file in the root directory of your website. This file might contain rewrite rules or redirection instructions. Check if there are any rules related to mobile redirection or database connection. If there are, ensure they are correctly configured.

    2). Review the website files: Since you mentioned the website is a simple HTML site, check the HTML files for any JavaScript or meta tags that might be responsible for the mobile redirect. Look for any JavaScript functions or code that perform device detection and redirection. Also, inspect the <head> section of the HTML files for any <meta> tags that control mobile redirection.

    If you have access to the website’s server logs or error logs, reviewing those can also provide useful information about the exact nature of the issue.

    Login or Signup to reply.
  2. Phone screens don’t look like typical laptop or computer screens.

    They are of different sizes and shapes.

    If you are making a webpage that is designed specifically for mobile access, it will be formatted and oriented differently than if you design it for a computer.

    Now, most good websites have both a mobile and desktop version.

    When you load the page with your device, you will be automatically directed to the correct version, and this is one way you will see discrepancies.

    If the mobile version of the site is working normally and the desktop version is not, then you might only be able to load the site on one device. so, try to check that webpage is added responsiveness for mobile.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search