0

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.

  • 1
    Did you find an answer? I have the same problem and surprisingly haven't found a useable solution on any only forum. – bowlerae Dec 11 '22 at 07:14
  • No I did not find a way to fix this. Ultimately, WordPress multi-user function is just a limited vApp in relation to running single Azure vApps and having more flexibility. In other words, I found that Azure had a neat way of deploying single WordPress instances as "Azure App Services". This way it's easier to bill to customer and this ease of billing plus with flexibility from Azure App Service is all I need. – generalissimo Dec 12 '22 at 16:03

1 Answers1

0

Are you creating the .htaccess file in the root of your website? so http://www.somedomain.com/ is set up as follows:

/
/.htaccess
/wordpress/
/wordpress/wp-admin/
/wordpress/wp-content/
/wordpress/wp-config.php

etc..

The changes should NOT be made to the .htaccess file under the wordpress folder.