Eggplant 301 Redirects
[resolved] Error establishing a database connection (8 posts)

  1. haywoodcrs
    Posted 1 year ago #

    I'm using this redirect plugin for maybe 100 pages, and all seem to work great except for a single page. After the redirect I get a blank page that says "Error establishing a database connection".

    I've tried to delete and recreate the redirect link as well as recreate the old html file and delete that as well, but nothing works.

    The page is http://www.travelthewholeworld.com/most_dangerous_countries.html which should be redirected to http://www.travelthewholeworld.com/most-dangerous-countries/


  2. eggplantstudios
    Plugin Author

    Posted 1 year ago #

    It seems as if WordPress is not able to capture this redirect.

    What happens if you remove the html file most_dangerous_countries.html, will the redirect then work?

  3. haywoodcrs
    Posted 1 year ago #

    The 301 redirects will only work on all my other pages if the html file is removed. With this not working page I added a new html file and deleted it again but no luck. Thanks!

  4. haywoodcrs
    Posted 1 year ago #

    Any other ideas on what I can try? I believe it was working when I first created it. I'm not sure what changed other than a recent version upgrade I did. The only difference I can think of between this page and all my others is the number of characters in the name. Others have the _ in the file name and do not create an issue.

  5. eggplantstudios
    Plugin Author

    Posted 1 year ago #

    Sorry, let me explain.

    Because of how WordPress works, existing files and folders are outside of WordPress - meaning WordPress is not initialized when you visit those files/folders.

    This is because the .htaccess file does not redirect them into WordPress, which in turn means this plugin does not have the opportunity to redirect.

    You have two options:

    1. Backup and Delete these old site files.

    2. Do .htaccess redirects

  6. haywoodcrs
    Posted 1 year ago #

    Thanks for your response. I know basic html and css but not much beyond that regarding htaccess etc. What I'm doing with my site is converting it from a old .html pages that I wrote into wordpress. I change the code into a wordpress format, and when that is finished I delete the old .html file and apply the redirect. The redirect does not seem to work by the way if the old file is present.

    I thought the htaccess wouldn't be an issue since my other pages that I already created work. I've been doing this for a few months and so far have 138 pages all created in the same way that were former html files and are redirected into the new format without any issues.

    Are you aware of anything that would cause this single page not to work? I'm not sure if you're seeing the same issue when you go to this page, but I noticed when I go to the old most_dangerous_countries.html file on google chrome on my computer or a friends mac it works fine. When I go to the same address on internet explorer on my own computer I get the database issue.

    The only reason I knew there was a problem was because I was contacted by an advertiser who said the page was no longer live, but it was definitely working before.. I think the new version up may have changed something? I haven't checked every single page, but the random other ones I've gone through still seem to be working, but I worry there might be a few others that have died as well. Again thanks for your help!!

  7. eggplantstudios
    Plugin Author

    Posted 1 year ago #

    Yeah when I go to the page I get the database connection error.

    I suspect it's because the http://www.travelthewholeworld.com/most_dangerous_countries.html still exists, and something inside of the most_dangerous_countries.html file is having the Database Connection Error, not WordPress.

    Could you open the most_dangerous_countries.html, and email me the contents?



  8. eggplantstudios
    Plugin Author

    Posted 12 months ago #

    Solved, it was a caching plugin conflict.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Eggplant 301 Redirects
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic