Redirecting users to SSL-enabled connections

Please fill out the fields below so we can help you better.

My domain is:http://isliitrade.co.ke/

I ran this command:

It produced this output:

My web server is (include version):LiteSpeed

The operating system my web server runs on is (include version):Apache

My hosting provider, if applicable, is:A2 Hosting

I can login to a root shell on my machine (yes or no, or I don’t know):yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):no

I wanted to setup SSL redirection automatically to redirect all users and visitors to the secure version. However https not accesible to all the pages of the site and after looking the .htaccess file this is what it shows.

workaround for HTTP authorization
in CGI environment

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

TRACE and TRACK HTTP methods disabled to prevent XSS attacks

RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]

redirect for mobile user agents

#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.$
#RewriteCond %{HTTP_USER_AGENT} “android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile” [NC]
#RewriteRule ^(.
)$ /mobiledirectoryhere/ [L,R=302]

always send 404 on missing files in these folders

RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

never rewrite for existing files, directories and links

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

rewrite everything else to index.php

RewriteRule .* index.php [L]

Please help me out this.

Best regards,
Abdi

.htaccess

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

Or:

<ifModule mod_rewrite.c>
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://domain.com/$1 [L,R=301]
</ifModule>

Or

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ https://domain.com/$1 [L,R=301]
</IfModule>

Deal with mixed content before it becomes another ball of confusion.

<ifmodule mod_headers.c>
Header always set Content-Security-Policy: upgrade-insecure-requests
</ifModule>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.