RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule (.*) /web/$1
RewriteEngine On
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^images/(.*)$ web/images/$1 [L]
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule (.*) /web/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php
server {
listen 80;
listen [::]:80;
server_name ~^www\.(?<mydomain>example\.(?:de|es|ch|uk|eu|ru|nl|pl|us|fr|jp|co|hk|in|it))$;
rewrite ^(.*) http://$mydomain$1 permanent;
}
server {
listen 80;
listen [::]:80;
server_name ~^www\.(example\.(?:de|es|ch|uk|eu|ru|nl|pl|us|fr|jp|co|hk|in|it))$;
return 301 http://$1$request_uri;
}
RewriteRule ^pictures/product/[^/]+/(\d+)_\w+\.(jpe?g|png)$ /wp-content/uploads/$1.$2 [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)(page-\d+)
RewriteRule ^category/$ https://site.ru/$0%1? [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)section=(termoobrabotka_galvanicheskih_pokritij)(?:$|&)
RewriteRule ^$ https://zctc.ru/sections/%1? [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)section=([^&]+)
RewriteRule ^$ https://zctc.ru/sections/%1? [R=301,L]
sites/.htaccess
<Files ~ "^(?!.*\.(html|css|js|png|jpe?g|gif|woff2?|ttf)$)">
Deny from all
</Files>
sites/site1/admin/.htaccess
<Files ~ "^.*">
Allow from all
</Files>
RewriteCond %{THE_REQUEST} ^[^?]+\?\s
RewriteRule .* https://site.com/$0? [R=301,L]
RewriteCond %{THE_REQUEST} ^[^?]+//
RewriteRule .* https://site.com/$0 [R=301,L]
RewriteCond %{THE_REQUEST} " /section/%20"
RewriteRule ^ https://site.ru/section/ [R=301,L]
RewriteRule ^section/\s https://site.ru/section/ [R=301,L]
location / {
, а куда-нибудь вроде location ~ \.php$ {
RewriteCond %{THE_REQUEST} ^[^?]+//
RewriteRule .* /$0 [R=301,L]