title: How to create a route to an anchor on a page?
body: <p>Rails 4.2. I have a single page website, index.html.erb, Controller: Visitors. The navigation links are "About", "Services", "Pricing", etc. The navigation links are as follows:
      <li>&lt;%= link_to "About", anchor: "section2" %></li>
      <li>&lt;%= link_to "Services", anchor: "section3" %></li>
      <li>&lt;%= link_to "Pricing", anchor: "section4" %></li></p>
  
  <p>As is each link works but the url looks like this
      <a href="http://domain.com/#section2" rel="nofollow">http://domain.com/#section2</a></p>
  
  <p>I want the url to look as follows, I want the matched word "About" to point to the selected anchor
      <a href="http://domain.com/about" rel="nofollow">http://domain.com/about</a></p>
  
  <p>I tried a few of these variations in routes.rb but nothing worked.
      match 'about', to: 'visitors#index', anchor: "section2", via: :get</p>
  
  <p>I also tried to do a redirect in the visitors controller, about action as follows
      redirect_to action: "index", anchor: "section2"</p>
  
  <p>Nothing seems to work. Any ideas?</p>