How to redirect site from http to https?

  • 1 Replies
  • 31 Views
*

swatijain22

  • Full Member
  • ***
  • 119
  • +0/-0
    • View Profile
    • Black magic specialist
How to redirect site from http to https?
« on: May 14, 2019, 07:17:58 AM »
Hello friends,


 I Have face A problem In My Website,Please tell me, How to redirect site from http to https?

*

goyums

  • Newbie
  • *
  • 13
  • +0/-0
    • View Profile
Re: How to redirect site from http to https?
« Reply #1 on: May 16, 2019, 07:42:31 AM »
You can use .htaccess file and place this code snippets into it (with Linux Hosting & Cpanel/DirectAdmin):

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

or using this code (with specify domain name)

 RewriteEngine On
 RewriteCond %{HTTPS} !=on
 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 RewriteCond %{HTTP_HOST} ^www\. [NC]
 RewriteRule ^(.*)$ https://ohiwill.com/$1 [R,L]

 




See Our Webmaster Tools for Windows and Mac

A1 Sitemap Generator
      
A1 Website Analyzer
      
A1 Keyword Research
      
A1 Website Download
      
A1 Website Search Engine
      
A1 Website Scraper