Patrik Votoček
Patrik Votoček

Reputation: 675

Nginx redirect to hash

I have this vhost in nginx but i need to redirect with # (utm parameters) how to do it?

server {
    server_name www.example1.com;
    return      301 https://www.example2.com$request_uri; # here I need add utm parameters
}

Upvotes: 2

Views: 3475

Answers (1)

Mohammad AbuShady
Mohammad AbuShady

Reputation: 42889

Add quotes to the string and it should work.

return 301 "https://www.domain.com$request_uri#hash";

Upvotes: 5

Related Questions