Welcome to Host Capitol

Web Hosting Knowledge Base

Welcome to the Host Capitol Knowledge Base! This is the place to learn how to host, develop, and maintain your web site. The information here can also help you resolve any problems you may be experiencing with your account.

Protect Specific Pages with SSL

Overview

This article will show a way to protect specific pages of your website with SSL. This may have benefits for SEO and can be used on pages that contain forms, shopping carts or any other page where users might enter sensitive information.

Access The File Manager

To setup SSL protection on specific pages you must edit the .htaccess file which can be accessed from the file manager. The steps will explain how to access the file manager.
  1. Login to your Host Capitol account.
  2. Go to your Services tab and click on your hosting plan.
  3. Click the Web Hosting link next to Control Panels.
  4. Under the file management section click on File Manger.
  5. In the directory selection popup select the Show Hidden Files Option and click go.
  6. In the File Manager navigate to the public_html folder.
  7. Select .htaccess file
Alternatively, you can use an FTP Client to access your .htaccess file.

Edit The .htaccess File

Once you have found the .htaccess file in the file manager these steps will explain how to edit the file to add protection.
  1. Right click on the .htaccess file and select Code Edit
  2. At the top of the file insert the following code:
    RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} /Example/ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
  3. On the 3rd line of code which says “RewriteCond %{REQUEST_URI} /Example/” change Example to the page you want to protect with SSL. Example: If about was the name of a page you wanted to protect you could use “RewriteCond %{REQUEST_URI} /about/”
  4. Click the Save Changes button in the top right side.
  5. Check your website to ensure it is functioning as expected.
Share this: