# detect Accept-Language auto redirect to langauge path location = / { # Setup language prefix set $prefix_language $http_accept_language; if ($http_accept_language ~* '^(.+?),') { set $prefix_language $1; } # Setup redirect Schema set $redirect_schema $scheme; if ($http_X_Forwarded_Proto = 'https') { set $redirect_schema $http_X_Forwarded_Proto; } # Setup redirect Host set $redirect_host $host; if ($http_X_Forwarded_Host != '') { set $redirect_host $http_X_Forwarded_Host; } # Setup URL set $lang_url $redirect_schema://$redirect_host; if ($prefix_language ~* 'zh-TW') { return 302 $lang_url/zh-TW/; } if ($prefix_language ~* 'zh-CN') { return 302 $lang_url/zh-CN/; } # Default en-US return 302 $lang_url/en-US/; }

聯絡我們

service@toplay-ogs.com

0222508678

220, New Taipei City, 板橋區, 雙十路二段48號8樓

意見回饋

我們很期待您的意見回饋!請協助我們填寫以下表格來分享您的經驗!

每月電子報

© 2015 聖基創意股份有限公司(藥商#:北府板藥販字第623101L355號)