This has now been going round on various versions but never solved once and for all.
If a page doesn’t exist then it is naturally a 404. What you don’t want is an infinite number of 301 redirects. Think about the load on a server if someone spams mydomain.com/amp/xxx mydomain.com/amp/xxxx etc All of these will redirect and load the home page mydomain.com/amp/ . This occurs with every amp url.
There are two scenarios
1. AMP takeover – mydomain.com/rubbish/ is a 404 (generated by the AMP plugin) – it currently works, mydomain.com/good-path/amp/ currently 301 redirects to mydomain.com/good-path/ but it should be a 404 generated by the AMP plugin.
2. A mixed system of AMP and non AMP pages. mydomain.com/amp/rubbish/ should be a normal wordpress system 404 but it simply shows the content of mydomain.com but on the url mydomain.com/amp/rubbish/ This is very bad. It is like that for all urls – e.g. mydomain.com/goodpath/amp/rubbish/. Finally, mydomain.com/rubbish/amp/ does work correctly and gives a normal wordpress 404.
It seems to me that the way to solve this is to test the normal wordpress system to see if a url is a good one in the first place. If not then it is a 404 and the AMP plugin only has one choice to make – either issue a wordpress canonical 404 or a AMP plugin variation if the site is in AMP takeover.
-
This reply was modified 6 years, 8 months ago by
frenchomatic.
-
This reply was modified 6 years, 8 months ago by
frenchomatic.
-
This reply was modified 6 years, 8 months ago by
frenchomatic.