1

We have canonical style URLs that we use for FB sharing. Facebook can scrape these pages for the info it needs to... these pages generate a specialized image to be shared by the user.

A user can specify a string to be displayed on this image.

Samwise Gamgee is encoded like

Samwise%20Gamgee

sam & frodo

sam%20%26%20frodo

The issue is when any one hits these URLS the ampersand %26 is somehow being decoded by nginx

This...

www.example.com/path/Brian%26Bob%26Sally

Becomes...

www.example.com/path/Brian?Bob%26Sally 

Not sure why but the only the first ampersand is being rewritten. Any ideas why this might be? Is Nginx even capable of this?

  • Please provide the nginx version and the config that might be related to this, like rewrites, etc. – Izzy Nov 05 '15 at 07:52
  • Unfortunately I can't provide those details. Really I am just curious is this possible for nginx to do? I read that it is a possible protection mechanism is this true? – ductiletoaster Nov 05 '15 at 18:55
  • Nginx could (and somtimes would) decode `%XX` to real character, but I can't imagine it replacing `&` with `?`. – Alexey Ten Nov 06 '15 at 08:27

0 Answers0