Based on the @Zuul response, follow the version for your specific case,
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule blog/tag/dengue-mata/ http://meudominio.com/blog/tag/dengue-mata/ [R=301,L]
If you want to use parameters or some extra data after the bar, you can do so:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule blog/tag/dengue-mata(.*) http://meudominio.com/blog/tag/dengue-mata$1 [R=301,L]
Note that I have omitted the final bar to contemplate Urls without the bar as well. Adjust as needed.
Important: If your domain does not have the correct certificate, please sign in to https://
, the error message will appear before redirect anyway. This is in the nature of the protocol, which first makes the connection secure, then requests the path.
Beware of pure redirect:
The redirect is excellent, but when you just switch the protocol, and the path is the same, it can go into infinite loop, as in this case:
Redirect 301 /blog/tag/dengue-mata/ http://meudominio.com/blog/tag/dengue-mata/
I tried all the forms below and it didn’t work... I think there is another way to work... How do I get all my links that have "https://" redirected to the same link without www ? eg: https: // www. meudominio.com/test be redirected to https:// meudominio.com/test
– Israel
If it didn’t work the way below, something else is wrong with your setup. I even tested them all to see which ones looped and which ones didn’t. Are you sure your . htaccess is being read and that you have the necessary permissions? mod rewrite is enabled?
– Bacco