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

    (@westonruter)

    The plugin is moving away from any use of /amp/ in favor of ?amp because it allows for an AMP version to be used for every URL, without conflicting with other rewrite endpoints added by WordPress. The query var ?amp and the endpoint /amp/ are functionally the same, and there should be no difference in terms of SEO. (There used to be an SEO reason against it in the past, but this has not been the case for some time.)

    In my post, the tag: <link rel=”amphtml”… has a URL with /amp/

    I’d like to have “?amp”, because the url of website end with .html.

    Is possible to chenge it?

    – – –

    I controlled, some pages have /amp/ other pages have ?amp.

    The difference is into URL, if I have website.ext/page/ the AMP version is website.ext/page/?amp, into the page website.ext/article.html the AMP version is website.ext/article.html/amp/

    I’d like to have ?amp in all URL.

    Thanks.

    • This reply was modified 5 years, 9 months ago by mrjuri.
    • This reply was modified 5 years, 9 months ago by mrjuri.
    • This reply was modified 5 years, 9 months ago by mrjuri.
    Plugin Author Weston Ruter

    (@westonruter)

    @mrjuri You should be able to achieve this via:

    add_filter( 'amp_pre_get_permalink', function( $pre, $post_id ) {
        return add_query_arg( amp_get_slug(), '', get_permalink( $post_id ) );
    }, 10, 2 );

    Put this in your custom theme’s functions.php or a custom plugin.

    Thank you so much ??

    Maybe Google don’t index website.ext/article.html/amp/, but with website.ext/article.html?amp maybe It index it.

    I will tell this week, if It can be interesting.

    THanks again ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘change ?amp to /amp’ is closed to new replies.