"Cannot GET /redirect?code=4%2F5gEKjcLo3bjGzAtK7DqlPkI9TWEsdXDCe8PKkt2LZPfs9uMY0R4aZlkV1DibXKGIzSBmOPge9N3- code example
Example: 301 redirect
#http to https and www to non-www
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]