mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Cleaner Nginx redirection rules. Use permanent only when paths match.
This commit is contained in:
parent
204e3ed3ff
commit
7729d91e78
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ server {
|
|||
include conf.d/{{ domain }}.d/*.conf;
|
||||
|
||||
location /yunohost/admin {
|
||||
rewrite ^ https://$http_host$request_uri? permanent;
|
||||
return 301 https://$http_host$request_uri;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/{{ domain }}-access.log;
|
||||
|
|
|
@ -3,11 +3,11 @@ server {
|
|||
listen [::]:80 default_server;
|
||||
|
||||
location / {
|
||||
rewrite ^ https://$http_host/yunohost/admin permanent;
|
||||
return 302 https://$http_host/yunohost/admin;
|
||||
}
|
||||
|
||||
location /yunohost/admin {
|
||||
rewrite ^ https://$http_host$request_uri? permanent;
|
||||
return 301 https://$http_host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ server {
|
|||
add_header Strict-Transport-Security "max-age=31536000;";
|
||||
|
||||
location / {
|
||||
rewrite ^ https://$http_host/yunohost/admin permanent;
|
||||
return 302 https://$http_host/yunohost/admin;
|
||||
}
|
||||
|
||||
# Block crawlers bot
|
||||
|
|
Loading…
Add table
Reference in a new issue