I've created a new Wordpress with Alpine Linux on Azure as a App Service. And I've added the multi-site code to wp-config.php and the site does indeed have multi-site functionality with the network set to sub-directories.
However when I try to go to a new site's dashboard to configure, and I can't reach the page. Initially I created .htaccess by hand and added the important lines of code.
But after some researching, I found a thread that says, if you add: thiswillcause500error
in the top of .htaccess which I created, then if this file actually works, then the Wordpress multi-site should prompt me with an error. And almost as expected the site still worked, meaning the site never really used the handmade .htaccess file.
Based on this answer: https://wordpress.org/support/topic/cant-login-to-multisite-dashboards/
thiswillcause500error
# BEGIN WORDPRESS
<IfModule mod_rewrite.c>
RewriteEngine On
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).*) /$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /$2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WORDPRESS
/* MULTI-SITE CODE BEGINS */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', 'false');
define('DOMAIN_CURRENT_SITE', 'company-multisite.azurewebsites.net');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* MULTI-SITE CODE ENDS */
If I go to Settings > Permalinks and click save changes, as many threads suggests to automatically create this .htaccess file, the server still won't create this file.
I've also tried these suggestions to no avail.
Wordpress Multisite - Can't access subfolder sites dashboard
So what is the issue here, I followed the steps but something seems to be missing. Perhaps something wrong with mod_rewrite? Any help is much appreciated.