WordPress.org

Ready to get started?Download WordPress

Forums

Redirects (10 posts)

  1. duches77
    Member
    Posted 9 years ago #

    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.

  2. Root
    Member
    Posted 9 years ago #

    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.

  3. davidprince
    Member
    Posted 9 years ago #

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

  4. davidprince
    Member
    Posted 9 years ago #

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

  5. duches77
    Member
    Posted 9 years ago #

    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.

  6. davidchait
    Member
    Posted 9 years ago #

    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

  7. duches77
    Member
    Posted 9 years ago #

    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?

  8. duches77
    Member
    Posted 9 years ago #

    bump

  9. duches77
    Member
    Posted 9 years ago #

    bump

  10. duches77
    Member
    Posted 9 years ago #

    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... ^^;;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.