title: SEO in Ionic PWA
body: <p>I just finished building a PWA using Ionic. Now i am stuck in making PWA SEO enabled.</p>
  
  <p>Since in ionic there is #(Hash location strategy) enabled in ionic and this results in # in all of the urls which doesn't help at all in SEO.</p>
  
  <p>So to remove # I tried setting Path location strategy {locationStrategy: 'path'} in AppModule. This removes the # from the url. But when I try to refresh it or go directly to a url, it returns 'Cannot GET /url' </p>
  
  <p>Few things I read for this problem is to rewrite to index.html in every request made Or try something as follows in node express.</p>
  
  <pre><code>app.get('*', (req, res, next) =&gt; {
     if ((req.url.indexOf('#') &gt; -1) ||
        ((req.url.lastIndexOf('.') === -1) ||
        (req.url.indexOf('/', req.url.lastIndexOf('.')) &gt; -1))) {
      req.url = `/#${req.url}`;
    }
  next();
  });
  </code></pre>
  
  <p>Both the above will not solve my problem because if I want to access a url directly i.e.. localhost/a/b . The above solutions will rewrite to localhost/home(Base URL) which I don't want.</p>