Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
560 views
in Technique[技术] by (71.8m points)

url rewriting - .htaccess redirect /amp/ urls to nonamp version

I need to recover AMP Urls after switching off Google AMP. Can you help me please for having 301 redirects on any AMP url back to NonAMP Version?

Example:

anydomain/hardware/heute-ist-putztag/amp

back to

anydomain/hardware/heute-ist-putztag
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

found a solution at myself

RewriteRule ^(.*)/amp$ $1 [R=301,L]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...