Freehosting.host Help
As easy as 1, 2, FREE!
  • Home
  • Self Help
  • FAQ
  • Main website

How to force HTTPS using the .htaccess file

Simply enter this code on your .htaccess file in the website root.

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

 

On a website created in a sub-folder, for example folder “/folder/”, use this:
# Force HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} folder
RewriteRule ^(.*)$ https://www.example.com/folder/$1 [R,L]

 Hosting    Https , Ssl

Related Knowledge Base Posts -

  • Memcached access
  • MySQL access
  • Reactivating suspended service due to lack of login into client area

Login

Register| Forgot Password?

Search Self Help

 

Categories

  •  cPanel (6)
  •  Domains (5)
  •  Emails (9)
  •  General (1)
  •  Hosting (22)
  •  My account (0)

Search All

  • Freehosting
  • Email On Demand
  • Client Area
  • Help Tickets
  • Contact
  • Terms
© FreeHosting 2017
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Read More
Privacy & Cookies Policy
Necessary Always Enabled