Big question: could the main site be in a subdirectory?
-
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 MultisitePlease 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
- You must be logged in to reply to this topic.