[resolved] Cant login to the admin. (11 posts)

  1. lucia-lugano
    Posted 4 years ago #

    Installed Multisite several times. No problems.
    But on 1 webserver got a redirection error:

    Cant login to the admin.
    Frontend works fine but I had to alter the htaccess file because the webserver has a redirection also.

  2. Marventus
    Posted 4 years ago #

    Could you please post a link to your site?

  3. lucia-lugano
    Posted 4 years ago #




    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/wordpress/';
    define( 'DOMAIN_CURRENT_SITE', 'dutch88.vdx.nl' );
    define( 'PATH_CURRENT_SITE', '/wordpress/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    if I put '~admin6/' in the PATH_CURRENT_SITE I get a DB error


    However the htacces file:

    RewriteEngine On
    RewriteBase /~admin6/wordpress/
    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]
  4. I deleted your username and password. DON'T post that for anyone!

    I'm wondering if it's because you have both $base and PATH_CURRENT_SITE in there...

  5. lucia-lugano
    Posted 4 years ago #

    I will try that.

    Could it be something to do with the cookies?

  6. You can flush the cookies on your browser and test, but I don't think so.

  7. lucia-lugano
    Posted 4 years ago #

    Think the problem is that WP MS does not recognize that the installation is in a subdir.

    in line 69 WP constructs a $blogname from the REQUEST_URI and $path but the output is not good because the subdir is not being displayed in the $path.
    Because WP does not recognize the $blogname so Im being redirected.

    SCRIPT_FILENAME /var/www/html/xx.php
    REQUEST_URI 	/~admin6/xx.php
    SCRIPT_NAME 	/xx.php
    SCRIPT_URI 	http://myserver.nl/~admin6/xx.php

    Does that sounds like an option?

  8. Does your install know it's in a sub directory WITHOUT MultiSite? I mean, was it all working before you turned on MultiSite?

  9. lucia-lugano
    Posted 4 years ago #

    got it.

    In the wp-config.php I defined COOKIEPATHwith the physical url

    In ms-load.php I adjusted at line 140:

    if ( defined( 'COOKIEPATH' ) ) {
       $current_site->path    = PATH_CURRENT_SITE;
       $path = COOKIEPATH;
       $current_site->path   = $path = PATH_CURRENT_SITE;
  10. I can't say that editing WP core files is ever the right thing to do... But I'm really not sure how this broke either.

  11. lucia-lugano
    Posted 4 years ago #

    Yeah ur right.
    Its only for this setup.
    When Im going to use the def. server I can delete this code.



Topic Closed

This topic has been closed to new replies.

About this Topic