amp-module icon indicating copy to clipboard operation
amp-module copied to clipboard

How do I change the url structure of amp pages to be pageurl+?amp

Open thangarajj opened this issue 4 years ago • 1 comments

Hello!

Since we are transitioning from an existing wordpress based website to a nuxtjs powered website, we are trying to reuse the existing url structure as is for seo purposes. For our amp pages, the default that is used in the wordress amp plugin was to append '?amp' to the regular page url in order to render it as an amp page. But from what I understand this nuxt amp module actually prefixes '/amp' to the root of the url path. Since I don't see an option to change this in the plugin options (as documented), I wanted to check if such an url change for amp pages is possible? Please let me know.

thangarajj avatar Jan 30 '21 09:01 thangarajj

Hi, Unfortunately there isn't any option to detect amp page using query params. But to achieve your goal you can create simple redirect rule o redirect urls with ?amp into new urls.
redirect-module could be helpful.

farnabaz avatar Feb 10 '21 14:02 farnabaz