Answer the question
In order to leave comments, you need to log in
How to properly set up .htaccess for file uploads?
Good day! Please tell me, I am making a bilingual multisite on WordPress using the subdirectory method (sitename.ru/en), everything works on the local server, on other hostings too, but the .htaccess file does not work correctly on the majordomo hosting. On this hosting, it searches for all static files in the en/ subdirectory, which in fact does not exist, respectively, neither pictures nor template files are loaded on the site, only text. I contacted technical support, they helped only with sympathy and advice "you need to make changes to the .htaccess file so that static files are not loaded from the / en folder." I'm not very familiar with this file yet, has anyone come across this before or just can help?
Here is the code of the existing file (actually standard,
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question