Skip to content

Instantly share code, notes, and snippets.

@ans-4175
Last active December 24, 2022 05:17
Show Gist options
  • Save ans-4175/5ebfdce029f9ba5a4ed8f108df80378b to your computer and use it in GitHub Desktop.
Save ans-4175/5ebfdce029f9ba5a4ed8f108df80378b to your computer and use it in GitHub Desktop.
Nginx Conf
server {
server_name www.sites.com;
# access_log /var/log/nginx/ops/access.log;
# error_log /var/log/nginx/ops/error.log;
location ~* ^/([^/]+) {
return 301 https://something.com?params=$1;
}
location /kontak {
if ($query_string ~ source=instagram) {
return 301 https://something.com/instagram?params=$1;
}
if ($query_string ~ source=tiktok) {
return 301 https://something.com/tiktok?params=$1;
}
return 301 https://something.com/default?params=$1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment