The MU forums have moved to WordPress.org

Problem with 404 not found and wp-newblog.php (5 posts)

  1. michelem
    Member
    Posted 18 years ago #

    First of all my problem is: I got my homepage instead a 404 (or post not found) if I try to reach a nonexistent page, the "post not found" works only if I reach a url like "http://mydomain.com/2005/10/14/something" with url like "http://mydomain.com/2005/something" or "http://mydomain.com/something" I always reach the homepage

    Then I have another problem, if I try to reach the wp-newblog.php from a user blog, I got the signup page in the user blog template! This is not acceptable at all.

    This is my .htaccess: http://www.rafb.net/paste/results/HZp1hB61.html

    Could you give me some hints please? Thank you.

  2. ballen
    Member
    Posted 18 years ago #

    Michelem,
    If you remove read permissions from the invite.php and wp-newblog.php, that will make it so that random people can't set up a blog. (Are there any others?) It will also make it so that you are not able to have people respond to invites and all that jazz, but if you are worried about it until a fix comes out, that is how we have handled it.

  3. michelem
    Member
    Posted 18 years ago #

    Thanks ballen I solved it with this code in wp-newblog.php (I dont want the invite system):

    $host = explode(".", $_SERVER['HTTP_HOST']);
    if (eregi("^/wp-newblog.php$", $_SERVER['REQUEST_URI']) OR eregi("^/signup[\/]$", $_SERVER['REQUEST_URI']) OR eregi("^/invite[\/]$", $_SERVER['REQUEST_URI'])) {
    if ($host[0] != "mydomain") {
    header("Location: http://mydomain.com/signup");
    }
    }

    What do you think about it? It's temporary but it works for my needs.

    The first problem persist and I don't know what could be the problem, I think some missed or wrong rewrite rules and I discover that if I try get "http://username.mydomain.com/wrongurl" I always got the global homepage ("http://mydomain.com/")
    mmmh...

  4. ballen
    Member
    Posted 18 years ago #

    That goes a bit beyond me at this point. Hopefully some of the other people on here that are better than I at this can help you out...

  5. jaseone
    Inactive
    Posted 18 years ago #

    That should work although I think you could also do it with RewriteRules but RewriteRules give me a headache.

About this Topic

  • Started 18 years ago by michelem
  • Latest reply from jaseone