By Philippe on Tuesday, 23 March 2021
Posted in Technical Issues
Likes 0
Views 1K
Votes 0
Hello,

I want to redirect old AMP urls to non AMP with htaccess.
https://www.domain.com/articles/title?format=amp => https://www.domain.com/articles/title

I tried this, but it doesn't work :

RedirectMatch 301 ^/articles/(.*)$\?format\=amp https://www.domain.com/articles/$1

Do you have an idea ?

Thank you,
Philippe
To be honest, I am not familiar with this Htaccess 301 Redirect Rules but you can give it a try this.


RedirectMatch 301 /articles/(.*)\?format=amp /articles/$1


However, I am really sorry but unfortunately this is beyond the scope of our support.

Thanks for understanding.
·
Tuesday, 23 March 2021 18:36
·
0 Likes
·
0 Votes
·
0 Comments
·
No problem Arlex.

I've found a solution :

RewriteCond %{QUERY_STRING} "format=amp"
RewriteRule (.*) /$1? [R=301,L]
It might be useful for other users

Philippe
·
Tuesday, 23 March 2021 19:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing.
·
Wednesday, 24 March 2021 10:12
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post