2

What do you think about this solution? The idea is to make the no-www version as the canonical one. So we simply strip out the 'www.' from the request url:

!= '<link rel="canonical" href="' + request.url.gsub(/www\./, '') + '" />'

Any problems?

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
randomguy
  • 12,042
  • 16
  • 71
  • 101

1 Answers1

0

Take a look at Rack Canonical Host. I think it does exactly what you are looking for.

phlipper
  • 1,834
  • 15
  • 14