Regarding AMP to non-AMP in .htaccess

#1
Hi.
I have several sites with HostAramada, which are using the LiteSpeed Server.
I would like to redirect AMP to non-AMP.
When I use a plugin like RankMath it works.

But when I put the code mentioned in .htacess posted on several forums, it doesnt. work.
I also contacted the hosting support. But to no use.
Could you please tell what is wrong.

I'm using this redirection code in .htaccess.

Code:
RewriteCond %{REQUEST_URI} (.+)/amp(.*)$
RewriteRule ^ %1/ [R=301,L]
Why its not working and what is the correct code for redirection?
 

Unique_Eric

Administrator
Staff member
#2
Although I didn't do the test, but the rule looks ok, may I know if you have tried to place it on the top of the .htaccess file?
 
Top