title: Postname permalinks not working – all pages send to homepage
body: <p>I have WordPress installed in a subfolder of my domain. I want to keep it there, so that it is accessible only through <a href="http://www.example.com/mywordpress" rel="nofollow noreferrer">http://www.example.com/mywordpress</a>.</p>
  <p>I have an issue with permalinks. If I use postname permalinks, all my pages (with different templates applied) redirect to the homepage, while my archives (including custom post type archives and singles) are displaying correctly. If I use custom structure permalinks and I prepend anything to the postname – for example /test/%postname%/ – all pages display correctly while custom post type archives and singles display a 404 error.
  This happens whenever I refresh permalinks and also after replacing .htaccess with one from a brand new WP install.</p>
  <p>The odd thing is also how the permalinks are displaying in the browser url field:</p>
  <p><strong>if I use /%postname%/</strong></p>
  <ul>
  <li>pages (not working) display as
  <a href="http://www.example.com/mywordpress/postname" rel="nofollow noreferrer">http://www.example.com/mywordpress/postname</a> – they all display the
  homepage contents</li>
  <li>CPT archives+singles (working) display as
  <a href="http://www.example.com/mywordpress/postname" rel="nofollow noreferrer">http://www.example.com/mywordpress/postname</a></li>
  </ul>
  <p><strong>if I use /test/%postname%/</strong></p>
  <ul>
  <li>pages (working) display as
  <a href="http://www.example.com/mywordpress/postname" rel="nofollow noreferrer">http://www.example.com/mywordpress/postname</a> – so without the
  prepended text!</li>
  <li>CPT archives+singles (not working) display as
  <a href="http://www.example.com/mywordpress/test/postname" rel="nofollow noreferrer">http://www.example.com/mywordpress/test/postname</a> – displaying a 404
  error</li>
  </ul>
  <p>My custom post types have slugs translated to different languages with WPML. I thought that might cause the issue, however I tried to deactivate all plugins included WPML and still no luck.</p>
  <p>Does anyone know what might cause that?</p>