0

I'm using Apartment gem, with Rails 5.0.0.1.

The URL that I'm trying to access is: lkm.harabiz.com, and accidentally, I attached www with it, and it became: www.lkm.harabiz.com, and now I can't access lkm.harabiz.com. Each time I try to access: lkm.harabiz.com, it enforces the URL: www.lkm.harabiz.com on Google Chrome.

The solution may be to delete the URL that starts with www from history in Chrome, or something to do with cookies, but what if a novice person accidentally types www as my client did, how would he solve the riddle without getting too much into the technical details?

Also, is there a way to redirect www.lkm.harabiz.com to lkm.harabiz.com through code?

Arslan Ali
  • 17,418
  • 8
  • 58
  • 76
  • So have you tried deleting the URL from History? Usually a response redirect (301) would work, called redirect_to in Ruby I believe – Dijkgraaf Jun 12 '17 at 22:24

1 Answers1

0

Clearing cache in Chrome should resolve your problem, but you may want to configure your DNS rules to allow www.lkm.harabiz.com to resolve to the same address as lkm.harabiz.com.

Brian
  • 5,300
  • 2
  • 26
  • 32