Force SSL with htaccess on linux

Force SSL with htaccess on linux

if you already have a .htaccess just edit it using the same command above. Add the following contents to it:

SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq "domainname.com"

Save and exit. Make sure that the permission for .htaccess file is set to 644.

    • Related Articles

    • Force SSL with htaccess on linux

      if you already have a .htaccess just edit it using the same command above. Add the following contents to it: SSLOptions +StrictRequire SSLRequireSSL SSLRequire %{HTTP_HOST} eq "domainname.com" Save and exit. Make sure that the permission ...
    • How to force HTTPS using the .htaccess file

      To force all web traffic to use HTTPS - insert the following lines of code in the .htaccess file in your website's root folder. Important:If you have existing code in your .htacess, add this above where there are already rules with a similar starting ...
    • Install SSL Certificate inside SolidCP

      Login to your SolidCP Control Panel 2. Click on Web Sites under your plan. 3.Click on the website to which you wish to install the SSL. 4. Choose SSL from the tabs on the next window. 5. If you already have the SSL click on Upload Certificate, ...
    • CMS Brute Force Protection - htaccess

      Content management systems (CMS) such as Wordpress and Joomla! have become regular targets of brute force attempts. The most common way these types of attacks are performed is by hitting the wp-admin.php and administrator/index.php with thousands of ...
    • Force www.MyDomain.com or without www (MyDomain.com) in a URL

      I would like to force my sites to show www.MyDomain.com or to show without www. How can I do this? This is easily done with our linux servers by using the following .htaccess directives. .htaccess is a regular text file that can be created in the ...