Search

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima incidunt voluptates nemo, dolor optio quia architecto quis delectus perspiciatis.  

Categories: ErrorSEO

How to redirect http to https in .htaccess?

Hello guys, you and me, both are well aware about this post. You have reached here by searching, how to redirect http to https using htaccess file in the search engine search bar, so that your website does work fine and show the secure connection on the web browser like below image wizard.

And I would try to give my 100% to solve this error ( redirect http to https) easily and step by step, so that you never regret that may left this post hardly with sadness.

Follow the steps for redirect http to https in htaccess file

  1. First of all you need to login your cpanel with hosting access credential (hosting login detail). Once you have loged in your hosting cpanel, then you will see this wizard under public_html.

2. In the second step, you need to right click on the fine and click twice on the upcoming edit button. You may refer images which are given in the image gallery beow.

After doing this you will reached on the edit page where, you have to edit the redirection code (http to https)

Redirect http to https code (redirect code no. 1)

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

Guys, you can use this code to redirect http to https, but there is some information, which you need to mind at the time of implementation of the final step.

In the given above code you need to replace example.com with your domain name, which is recommended

Final Example of redirect http to https

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.atespost.com/$1 [R,L]

3. After completed the editing process in the .htaccess file for redirect http to https, then you need to click on the save button as mentioned in the above image wizard.

Redirect http to https code (redirect code no. 2)

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

Note: In this htaccess redirection code, you need to replace example.com to your won domain. It could be .in, .net, .org and many more as you know very well.

Recommended For Easy to Help by Video

admin

Recent Posts

OX2 and Trina Storage Sign Framework Agreement for 3 GWh of Battery Storage Systems

Swedish renewable energy developer OX2 has signed a framework agreement with Trina Storage, the energy…

3 weeks ago

Manisha Bhanwala Makes History, Wins World Wrestling Title for India

Historic achievement: Manisha Bhanwala became the first Indian woman to win a wrestling world championship…

1 month ago

How to Create Karwa Chauth Elegance Images with ChatGPT?

A simple, step-by-step guide with ready-to-copy prompts for realistic festive photos Karwa Chauth is a…

1 month ago

Troponin T Test: Normal Range, High Levels and What They Indicate

Chest pain and sudden breathlessness are often required urgent evaluation in any clinical setting for…

1 month ago

पीएम की मंशा पर भ्रष्ट अफसरों ने फेरा पानी, वी बी जी राम जी एक्ट में संशोधन कर असली मस्टर रोल के अनुपालन की मांग

वामपंथी एकता मंच साहेबगंज झारखण्ड ने सी. पी. आई. पार्टी मुख्यालय दिल्ली को भेजा पत्र…

1 month ago

How to Fix QBW File won’t Open Issue?

Sometimes, you face a situation where your QuickBooks Company (QBW) file fails to open. You…

1 month ago