Skip to content

Commit

Permalink
- wip
Browse files Browse the repository at this point in the history
  • Loading branch information
EwelinaSkrzypacz committed Nov 19, 2024
1 parent d127c68 commit aed24fe
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions environment/prod/app/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ http {
sendfile on;
keepalive_timeout 65;

map $http_accept_language $lang {
default pl;
~en en;
}

server {
listen 80 default;
server_name blumilk-website-nginx;
Expand All @@ -32,10 +37,33 @@ http {
root /application/public;
index index.php;

rewrite ^/partnerships$ https://www.blumilk.pl/ permanent;
rewrite ^/services https://www.blumilk.pl/ permanent;
rewrite ^/privacy https://www.blumilk.pl/pl/polityka-prywatnosci permanent;
rewrite ^/company https://www.blumilk.pl/pl/dane-firmy permanent;
location = /privacy {
if ($lang = pl) {
return 301 /pl/polityka-prywatnosci;
}

if ($lang = en) {
return 301 /en/privacy-policy;
}
}

location = /company {
if ($lang = pl) {
return 301 /pl/polityka-prywatnosci;
}

if ($lang = en) {
return 301 /en/privacy-policy;
}
}

location = /partnerships {
return 301 /;
}

location = /services {
return 301 /;
}

if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
Expand Down

0 comments on commit aed24fe

Please sign in to comment.