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

    (@westonruter)

    Hello. Why use .htaccess for this? It would be better to use WordPress. Why? Not every URL will have an AMP version. You could turn off AMP for specific templates as well as opt-out of AMP for specific posts/pages. Therefore, the redirect should be done with code such as can be seen in this “AMP Mobile Redirection” proof of concept extension plugin to the AMP plugin: https://gist.github.com/westonruter/787c875e5ab724808c26014153e46ec6

    Consider also a companion AMP-to-AMP Linking plugin: https://gist.github.com/westonruter/f9ee9ea717d52471bae092879e3d52b0

    Thread Starter maweb

    (@maweb)

    Well, how do I install them on my wordpress website?

    I have to insert the two php files manually in the folder /wp-content/plugins/amp ?

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

    (@westonruter)

    No, put the PHP files in wp-content/plugins. They are separate plugins. You can then find them I the plugins screen to activate.

    Note that the plugin’s assume you are using Transitional mode. If you are using Reader mode, the one plugin will do no redirection (as otherwise a user would not be able to exit Reader mode).

    • This reply was modified 5 years, 7 months ago by Weston Ruter.
    Thread Starter maweb

    (@maweb)

    Perfect.!

    Uploded both in the plugin folder, then i’ve activated both.!

    It works.!

    With my mobile, I put the normal url (not amp) of the website and i see the amp page (/?amp)

    With desktop i see the normal one.!

    Great Job.!

    • This reply was modified 5 years, 7 months ago by maweb.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘AMP redirect with Question Mark (?)’ is closed to new replies.