Multisite setup .htaccess question. | WordPress.org

[ad_1]

Hello,
I appreciate your question. Well I suggest you to go with option (B). the reason for this is given below.

When adding code to your .htaccess file for a multisite installation in WordPress, you typically want to add the new rules within the existing WordPress block. So, you should not replace the entire block, including the comments and directives between “BEGIN WordPress” and “END WordPress.”

In your case, you should only replace the section within the <IfModule mod_rewrite.c> block. Replace the existing rules related to WordPress within that block with the additional code provided for multisite setup.

So, the correct approach is (B): only replace the section with the code beginning with “IfModule mod” and ending with “/IfModule.”

Your updated .htaccess file should look something like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# Add your multisite rules here

</IfModule>
# END WordPress

Make sure to keep the existing WordPress directives intact and only replace the relevant section for multisite. If your multisite installation is working fine after making these changes, it indicates that you did the correct thing.

You can also follow this link for set up it properly – https://multilingualpress.org/docs/how-to-install-wordpress-multisite/

I corrected the .htaccess file so only the code within <ifModule mod_rewrite></ifModule) is replaced and everything still works. Hopefully this will avoid any problems moving forward.

Thank you for your help 🙂

Russell

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer