title: angularjs: ajax website using Ruby On Rails not crawling
body: <p>I am trying to make an angularjs site crawl-able.To do that i am using ?_escaped_fragment= solution as suggested by Google.</p>
  
  <p>For example:</p>
  
  <p>When google sees request with hash fragment like <code>"http://xample.com/#!/Home"</code> ,it convert the url into <code>"http://xample.com/?_escaped_fragement_=/Home"</code>.</p>
  
  <p>I have implemented <code>Index controller</code> in rails that accepts such request and redirect that request to <code>crawler controller</code> which in turn provide dynamically generated HTML snapshot to the Google.</p>
  
  <p>However except my home page <code>http://xample.com/</code> 
  no other pages are getting crawled.(maybe because of hashbang)</p>
  
  <p>Below are the url that are not crawled even after implementing ?_escaped_fragment_= solution as suggested by google:-</p>
  
  <pre><code>http://xample.com/#!/Home
  http://xample.com/#!/xyz
  http://xample.com/#!/abc
  http://xample.com/#!/def
  </code></pre>
  
  <p>Controllers Used by me:-</p>
  
  <p><code>Index controller</code> accepts Url with "?_escaped_fragment_="</p>
  
  <pre><code>    class IndexController &lt; ApplicationController
        def index()
          if params['_escaped_fragment_'] == '/Home'
            redirect_to :controller=&gt;'crawler', :action =&gt; 'crawlhome'
            return
          elsif params['_escaped_fragment_'] == '/Xyz'
           redirect_to :controller=&gt;'crawler', :action =&gt; 'crawlxyz'
            return
          end
   elsif params['_escaped_fragment_'] == '/abc'
           redirect_to :controller=&gt;'crawler', :action =&gt; 'crawlabc'
            return
          end
      end
  
   elsif params['_escaped_fragment_'] == '/def'
           redirect_to :controller=&gt;'crawler', :action =&gt; 'crawldef'
            return
          end
  end
  </code></pre>
  
  <hr>
  
  <p>Crawler controller</p>
  
  <pre><code>    class CrawlerController &lt; ApplicationController
        layout false
        require 'net/http'
        require 'uri'
        def crawlhome
        @data = "getting data from api and displaying same data in view"
        end
  
        def crawlXyz
        @data = "getting data from api and displaying same data in view"
        end
  
         def crawlabc
        @data = "getting data from api and displaying same data in view"
        end
  
     def crawldef
        @data = "getting data from api and displaying same data in view"
        end
      end
  </code></pre>
  
  <p>The Seo concerned person working in my company suggested to me to implement the website without <code>hashbang</code>(push state) in the url.Is this the right solution for the problem.</p>
  
  <p>This however does not work in the non-Html browsers.</p>
  
  <p>What might be the problem with implementing <code>http://xample.com/#!/Home</code>.Why is it not crawling in the above case.</p>
  
  <p>I have tried many different solutions from the forum but still not giving me the proper results.</p>