htaccess – WordPress Multisite and how to apply sef urls only to specific sites


I have a WordPress Multisite installation with its main url set to
(there are some nginx proxies behind this url which I can’t manage)

Most of the sites are generated as

One of the sites has a special url set (masked in one of nginx proxies) as:
(which internally -i guess- redirects to without user noticing that)

I’ve already edited site’s settings in WP Site Manager to reflect this url and works

Multisite already has an .htaccess file set for sef-urls which is working, but:
If I enable (in Permalink settings) the “entry-name” (or other) option all the links (including home) give 404

Is there any way to make sef-urls work for this specific site redirection in .htaccess?
Here’s actual .htaccess code:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
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]

Thanks a lot for any tip you can give me about this

Enrique 4 months 2022-04-11T11:34:58-05:00 0 Answers 0 views 0

Leave an answer