• My webadmin’s intranet machine has been having database issues (I’m currently trying to get him to fix it). However, I don’t want everyone to see the generic WordPress error that comes up while I’m trying to fix it. Is there some way to set up some sort of redirect so they get a static page that doesn’t rely on the database without using the .htaccess file? I’ve never worked with that file before and don’t feel comfortable doing it… not to mention that I’m not sure if I even have the permissions to change it. Since he’s been in and out on comp due to a knee injury, it’s been hard to get in touch with him about anything, so I’m looking for some quick temporary fixes to handle the issues with.

Viewing 9 replies - 1 through 9 (of 9 total)
  • As a fast fix you could just put in a quick index. html page saying work (improvements 🙂 ) are in progress.
    Then you could remove index.php completely (copy it first). That should do it.

    I don’t think you even need to remove index.php it will call index.html first.

    err if you are calling the blog directory and not specifically index.php.

    Thread Starter duches77

    (@duches77)

    Well… the errors are sporadic. Sometimes the database works, sometimes it doesn’t, which is one of the reasons why the problem is so hard to find. I don’t want to deny access altogether, especially if the page is working. I found the wp-db file that has the WordPress error in it… but I’m not sure what I would need to include or change in there in order to do a temporary redirect that would happen only when the error comes up.

    The problem is that you can’t generate a redirect after something has been sent. If no data has been sent back, and you’re dying on the CONNECTION step to the server (since later lookups after connected are more likely to have data already sent on the page…), you can certainly do a location header:
    header(“Location: $location”);
    where $location is the page to redirect to.
    -d

    Thread Starter duches77

    (@duches77)

    Yeah… I think that’s what I’m looking for. ^^;; Basically, it’s for when the database goes down and the connection fails. I’m getting the ‘wrong wp-config info’ message when I know the information is correct… which means it’s a connection error on the database end.
    So, if that’s what I need, how would I implement that? I’m assuming I would enter it into the wp-db file where the error message is stored, correct?

    Thread Starter duches77

    (@duches77)

    bump

    Thread Starter duches77

    (@duches77)

    bump

    Thread Starter duches77

    (@duches77)

    Well… since no one seems to want to answer this, I guess I’m going to have to give it a try on my own… Wish me luck… ^^;;

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Redirects’ is closed to new replies.