Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Hi. Thanks for the kind words.

    1) when we modify post and also change post URL (slug) the AMP page URL stops working.

    I don’t understand. Are you saying that the AMP URL is not redirecting to the new location when you change the slug? I cannot reproduce this problem.

    I just tried the following:

    1. Create a post called “Before”
    2. Navigate to the AMP version of the page: https://example.com/2019/03/22/before/amp/
    3. Change the slug to “after”
    4. Upon reloading the AMP page I am automatically redirected to https://example.com/2019/03/22/after/amp/

    2) we don’t understand what link is correct for AMP pages.

    Always refer to the amphtml link to determine the AMP URL. This is what search engines use. Also consider using the AMP Validator extension in Chrome to give easy access to the AMP version.

    The ?amp URLs are used for any post types that are hierarchical (e.g. pages). The /amp/ endpoints are used for non-hierarchical post types (e.g. posts) and any URL that has has query vars. You can see the full logic here:

    https://github.com/ampproject/amp-wp/blob/2960edcacf0cbf096f786aaded267e36f1329da5/includes/amp-helper-functions.php#L101-L124

    In native/paired modes, the ?amp query param is always used. In the future we may switch to using this for the Classic mode as well.

    Thread Starter Nikita_Sp

    (@nikitasp)

    @westonruter thanks for such a fast reply!

    1) Hmmm, you described the same procedure we’ve done, but it works fine for now.
    Maybe we did something else (I mean I miss something). I’ll come back to this question in a few days.

    2) Oh! Thanks, didn’t know that. Now it’s clear.
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘404 error for AMP page and URLs settings’ is closed to new replies.