Today I received an e-mail from a client telling me that the same page was available on two URLs, only with different layouts. At first I thought there might be a simple duplicate post somewhere, but after some searching I couldn’t find one.
After doing some digging, I realised that the same page was, indeed, available on two URLs of which one with a parent, for example – http://www.url.com/food/hamburgers and also on http://www.url.com/hamburgers. Both originate from the same page (post type is definitely ‘page’) but one is provided through the single.php template file, the other through page.php.
My question is whether this can be prevented? It is only supposed to be available on http://www.url.com/food/hamburgers, with parent ‘food’ and through page.php. The other one doesn’t look good and aside this also doesn’t seem good for SEO to me.
Thank you for any help!