• Hi,
    I’m restyling a multilingual site, that I built ten years ago (and is still running).
    At the time I had tried to build a WP-Multisite, but I couldn’t get it to work and gave up, and actually installed a WP for each site.

    Let me preface: the main site is located in a subdirectory, ie:

    • main site (in Italian language): mydomain.com/new
    • site 2: mydomain.com/new/en
    • site 3: mydomain.com/new/de

    Now, facing the site restyling, I decided to try again, but I can’t get into the board for them (I get the following message: The requested URL was not found on on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.).
    The secondary sites cannot be reached, because I’m always redriven to the main site.

    Could the reason be that the main site is located in a subdirectory?
    This is my .htaccess file:

    RewriteOptions inherit
    # BEGIN GD-SSL
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_USER_AGENT} ^(.+)$
    RewriteCond %{SERVER_NAME} ^mydomain\.com$ [OR]
    RewriteCond %{SERVER_NAME} ^www\.mydomain\.com$
    RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    Header add Strict-Transport-Security "max-age=300"
    </IfModule>
    # END GD-SSL

    # BEGIN WordPress Multisite
    # Using subfolder network type: https://wordpress.org/documentation/article/htaccess/#multisite

    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    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).*) $1 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $1 [L]
    RewriteRule . /new/index.php [L]

    # END WordPress Multisite

    Please note that I set an index with forwarder in the root

    <?php
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: https://mydomain.com/new/");
    exit();
    ?>

    Please, is anybody there who could answer/help me? Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter inesm

    (@inesm)

    I rectify: secondary sites are visible. The default page in twentytwentyfive theme, sometimes is shown right and sometimes not, but it is visible. The login page and manage board can never be reached.

    Moderator bcworkz

    (@bcworkz)

    Sub-directory based networks can be installed in a sub-directory itself. Sub-domain based networks must be installed in the domain’s public root. However, you can use your hosting’s virtual host feature to cause any public sub-directory to appear as the domain’s root, so the root installation requirement can be easily addressed. By doing so, you also wouldn’t need a redirect in public root.

    Your .htaccess file does not look like mine, but this does not mean there’s any issue. It is suspicious though. Your .htaccess directives should be whatever appears in Network Setup in the network admin area.

    Thread Starter inesm

    (@inesm)

    Thank you for the help, I’ll keep it in mind.
    Anyway, today a friend told me that multisite could not be the best solution for my needs.
    I think I will opt just for a multilingual plugin.
    I’m glad to have “experienced” a little around the multisite… perhaps for a future situation.
    Thanks again 😉

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.