WordPress.org

Forums

[resolved] wp-admin, Page Not Found.(sub-directory multisite) (6 posts)

  1. andrewk714
    Member
    Posted 3 years ago #

    Hello, This is my first post.

    I am help someone work on their WP Multisite (sub-directory).

    when you make a new site from the network admin panel, and then go to the site dashboard it comes up with a "page not found" message.

    Does anyone know what could be the problem?

  2. What's in your .htaccess?

  3. andrewk714
    Member
    Posted 3 years ago #

    This is my .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    </IfModule>

    # END WordPress

    # Change PHP memory limit, time limit,
    # max post size, and max upload file size
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_value upload_max_filesize 32M
    php_value post_max_size 32M

  4. That's the code for a subDOMAIN install of MultiSite (i.e. sitename.domain.com). If you're using subfolder, try this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress
    
    # Change PHP memory limit, time limit,
    # max post size, and max upload file size
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_value upload_max_filesize 32M
    php_value post_max_size 32M
  5. andrewk714
    Member
    Posted 3 years ago #

    Thank You! It worked!

  6. noonway
    Member
    Posted 3 years ago #

    Just in case somebody is using the Better WP Security plugin...

    You can also get this problem if you turned on the "Hide Backend" feature, lost your admin cookie and are trying to go to http://mysite.com/wp-admin.

    Go into your .htaccess file and you should see some lines like this:

    RewriteRule ^hidden_login/?$ /wp-login.php?hyy864en85h3q03f5vfs2d [R,L]
    RewriteRule ^.*wp-admin/?|^.*wp-login\.php not_found [L]

    The second line shows you that wp-admin.php and wp-login.php are both redirecting to a page not found error page.
    The first line shows what your alias is that you need to use to login to your site. So, the example above would mean instead of going here:

    http://mysite.com/wp-login.php

    I would need to type:

    http://mysite.com/hidden_login

    And I would be redirected to the proper site.

Topic Closed

This topic has been closed to new replies.

About this Topic