Tôi đang cố gắng để thiết lập một trang web Wordpress với nhiều địa điểm:cấu hình Caddy cho Wordpress nhiều địa
example.com
example.com/fr
Với những điều sau đây Caddyfile:
example.com:80 {
redir https://www.example.com{uri}
}
www.example.com:80 {
root /app/public
gzip
fastcgi/127.0.0.1:9000 {
ext .php
split .php
index index.php
}
rewrite {
regexp ^/[_0-9a-zA-Z-]+(/wp-.*)
to {path} {path}/ {1}
}
rewrite {
regexp ^/[_0-9a-zA-Z-]+(/.*\.php)$
to {path} {path}/ {1}
}
rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?_url={uri}
}
log stdout
startup /usr/sbin/php-fpm7.0 -F -O &
}
Khi tôi đạt đến số /fr/wp-admin/
, tôi nhận được 301 đến /wp-admin/
.
Có ai biết cách khắc phục điều đó không?