| |
| Knowledge Base |
|
| |
| Article number: kb-42 | Q. How to set up a website that is only accessible using SSL. (https://)
A. Applicable to Linux Packages only.
You should first have a SSL certificate installed on your domain.
Create a file named .htaccess in the directory your domain is pointing to and place
the following code:
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://www.domain.com/$1 [R]
(substitute www.domain.com with your domain)
Note: Domains can have SSL certificates installed on www.domain.com or just
domain.com. Please check what you have and then substitute it accordingly.
(https://www.domain.com/$1 [R] or https://domain.com/$1 [R])
Applicable to MS Packages only.
You should first have a SSL certificate installed on your domain.
Write a redirect script, that redirects all requests to your website to https://
<%EnableSessionState=False
host = Request.ServerVariables("HTTP_HOST")
if host = "usa-test.com" or host = "www.usa-test.com" then
response.redirect("https://www.usa-test.com/index.html")
else
response.redirect("https://www.usa-test.com/error.htm")
end if
%>
This script needs to be named default.asp and placed in the folder your
domain is pointing to.
|
| This page has been viewed 507 times |
|
Return to Search
|
|
|