WordPress Force HTTPS Redirection Without Plugin

https
without-plugin
ssl

#22

My Backlinks are fading. Since I deactivated W3 Total cache and started using WP super cache. The code is not working as before it was. I am getting error “This URL redirected too many times”.
@pradeepkumar @mskian


#23

try this bro

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#24

I added this already. No loop. Thanks for answering as I was thinking that it is not working for me.


#25

Is your ‘redirection’ issue fixed @Saurabh_Guttedar bro? :slight_smile:


#26

Yes, It is fixed. Thanks for asking.


#27

the given code is for what? I brought SSL certificate . in google some url are indexed with http. if i use the above code all those urls with http will be redirected to https? what about images?


#28

If this code is working, then that’s all you need, bro. Install “Really Simple SSL” plugin at the end as well. Check my reply on the other thread, please.


#29

Most of them Using Plugin for Force HTTPS Redirection in
Wordpress.Instead of Force SSL Redirect Plugin Use HTACCESS Rule for
Force HTTPS Redirection.

Every time trusting Plugin is Not a Good Idea

Easy to add you can Find the HTACCESS File on your Hosting File
Manager or Add via through Yoast SEO Plugin Yoast SEO > Tools >
File Editor…