I have WordPress installed in a subfolder of my domain. I want to keep it there, so that it is accessible only through http://www.mydomain.com/mywordpress.
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.
The odd thing is also how the permalinks are displaying in the browser url field:
if I use /%postname%/
– pages (not working) display as http://www.mydomain.com/mywordpress/postname – they all display the homepage contents
– CPT archives+singles (working) display as http://www.mydomain.com/mywordpress/postname
if I use /test/%postname%/
– pages (working) display as http://www.mydomain.com/mywordpress/postname – so without the prepended text!
– CPT archives+singles (not working) display as http://www.mydomain.com/mywordpress/test/postname – displaying a 404 error
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.
Does anyone know what might cause that?