WordPress Multisite Directory .htaccess

#1
I installed WordPress Multisite Directory and the suggested htaccess rules dont work

my static links are being converted with a trailing slash

example:
http://domain.tld/directory/wp-includes/js/hoverintent-js.min.js/


current htacces is:
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<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

# BEGIN LiteSpeed
# The directives (lines) between `BEGIN LiteSpeed` and `END LiteSpeed` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule Litespeed>
SetEnv noabort 1
</IfModule>
# END LiteSpeed
 
#6
domain.tld is just a hosts entry. i run a hyper-v image with ubuntu OLS installed and copied a virtual host i have also running in OLS based on existing one. single wp works, multisite domain works, just not multisite with directory
 
#7
i came with an idea too use multisite with directories for running a multilanguage woocommerce site . WPML or other plugin really slows down WP. but that is another story/topic
 

Pong

Administrator
#8
We need to access to your server to check if you have it test envirment somewhere we can ssh root login. You can log a ticket with such login.
 
#11
Anyone else that has this problem? I installed wp multisite on a diff server and still doesnt work. very weird. if i use apache then everything is fine
 
#13
I never got any answer. I send an email with all the needed logins on 12-3-2020 09:29.
i can send it again if you want?
i created extra a new wp install on a GCP VM with shell access, ftp and WP ofc
 
#16
Oh for me it was a very easy solution.
If your using OLS het means that with every htaccess change you need the restart the service in the terminal.
Code:
sudo service lsws restart
wait a bit and it should be fine. Didnt knew that i needed to restart the sevice in the terminal but thats why it's free i gues :)
Tested it now on 3 different vms and all are running Multisite on directories
 
#17
I did the forced restarts everytime i changed htaccess. (I think you can do it from the OLS portal too ?)
I am trying to rewrite URL https://st1.example.com/min/1nds.js to https://st1.example.com/static/cache/js/1nds.js
I changed my subdomain document root and kept it outside the public_html of main site, after creating the subdomain through cyberpanel.
Not sure if thats the issue but
https://st1.example.com/min/1nds.js is not found and never rewritten to https://st1.example.com/static/cache/js/1nds.js where the actual file resides.
 
#19
hehehe, easy solution for OLS. Support told me that's only for OLS. if you have Enterprise you dont need to restart it on every htaccss change.
Happy to hear/read that it is working for you.
 
Top