• Resolved AgeG

    (@ageg)


    Hi there,

    I developed a WordPress multisite project for a client of mine on one of my servers and then moved it to the server of the client.

    The frontend works just fine, but I can′t get access to the backend due to a redirect issue – thats my guess at least. After entering the login credentials I keep coming back the login screen with redirect written in the URL.

    The site is running on WordPress 3.3.1.
    Permalinks are set to the post name option.

    Here is my content of the .htaccess file:

    # 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]
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Here are some settings from the wp-config file:

    define('WP_ALLOW_MULTISITE', true);
    
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/wordpress/';
    define( 'DOMAIN_CURRENT_SITE', 'example.de' );
    define( 'PATH_CURRENT_SITE', '/wordpress/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    The strange thing is, I only got the frontend working on the new server, if set PATH_CURREN_SITE to “/wordpress/” and “$base = ‘/wordpress/’ is set, but actually there is no subdirectory “/wordpress/” on the new server, it′s called differently.

    The site was developed in a subdirectory of my website
    https://www.developmentsite.de/wordPress

    and now is moved to a subdirectory on the server of my client.
    In the config panel of the provider it′s set, that https://www.example.de points to https://www.example.de/subdirectory.

    I am kind of lost as I went trough this and other forums, but until now didn′t find any solution, that is working for me.

    Could you please help me to track down the issue?
    Let me know, if you need any further information.

    Thanks in advance,
    Age

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    When it said to replace your .htaccess with the new stuff, it meant … replace ??

    Start by fixing your /htaccess.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    # 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
    Thread Starter AgeG

    (@ageg)

    Hi IpStenu,

    thanks for getting back to me.

    I replaced my .htaccess entries with yours.
    Uploaded it and checked.

    Frontpage was working fine.
    But all other pages brought up a 404-Error Message and I still didn′t get access to the dashboard.

    Any idea how to proceed?

    Thread Starter AgeG

    (@ageg)

    I finally found the problem.

    Thanks a lot IpStenu – your .htaccess entries helped me, as I was quite sure, that the .htaccess file isn′t the cause of the problem.

    So continued looking somewhere else.

    It was actually an entry in the wp-blogs table in the database, where there were some ramains of the development environment.

    So – thanks again and this problem is solved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirect problem – can′t login to dashboard’ is closed to new replies.