• Resolved henrik.arvedsen

    (@henrikarvedsen)


    I am running a Magento mulitilingual store in which a WordPress blog is integrated. For having a separate blog for each language the multisite function has been enabled.
    Everything in frontend of the Magento store seems to work as it should.
    But when accessing the WordPress Multisite admin panel the paths for each new site is not working. Only the path for the original blog is accessible.

    WordPress is installed in subfolder /wp/ of the domain test.domain.com, so the blog path is test.domain.com/wp/.
    Magento is adding language codes so the url for the UK blog is test.domain.com/en/articles.

    The path for the German blog is in WordPress set to be /german/ but the path test.domain.com/german/wp-admin which is the link from the admin does not work.

    I access the admin panel through test.domain.com/wp/wp-admin.

    This is my .htaccess file:

    RewriteEngine On
    RewriteBase /wp/
    RewriteRule ^index\.php$ - [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).*) home/specimen/public_html/test/wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ home/specimen/public_html/test/wp/$2 [L]
    RewriteRule . index.php [L]
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wp/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wp/index.php [L]
    </IfModule>
    
    # END WordPress

    This is the affected part of my config file:

    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true );
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'test.domain.com');
    define('PATH_CURRENT_SITE', '/wp/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    In admin the following is stated for the German site, which does not work:
    Domain: test.domain.com
    Path: /deutsch/
    Siteurl: https://test.domain.com/deutsch/
    Home: https://test.domain.com/de/artikelen

    In admin the following is stated for the English site, which does work:
    Domain: test.domain.com
    Path: /wp/
    Siteurl: https://test.domain.com/wp/
    Home: https://test.domain.com/en/articles

    I have tried to change almost everything but have not found the right solution yet.
    Can anyone please help me? ??
    Thanks
    Henrik

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

    (@ipstenu)

    ?????? Advisor and Activist

    The path for the German blog is in WordPress set to be /german/ but the path test.domain.com/german/wp-admin which is the link from the admin does not work.

    I access the admin panel through test.domain.com/wp/wp-admin.

    Well.. yeah. The path would be test.domain.com/wp/german/wp-admin unless you set up WP to run from test.domain.com

    That said, your .htaccess is messed up.

    RewriteEngine On
    RewriteBase /wp/
    RewriteRule ^index\.php$ - [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).*) /wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /wp/$2 [L]
    RewriteRule . index.php [L]
    Thread Starter henrik.arvedsen

    (@henrikarvedsen)

    Thanks for fast reply.
    I did allready try the path /wp/german/ and it didn’t work before. But now it does.
    So it must have been the messed up .htaccess file. I don’t know how those extra lines did occur.

    Thank you SOOOOOO MUCH for your help. Much appreciated.
    All the best
    Henrik

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Admin path for new sites not working’ is closed to new replies.