Bluehost Web Hosting Help
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.
- Login to your Bluehost account.
- Go to your hosting tab.
- Click the cpanel link underneath the hosting tab.
- Under the file management section click on File Manger.
- In the directory selection popup select the Show Hidden Files Option and click go.
- In the File Manager navigate to the public_html folder.
- Select .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.
- Right click on the .htaccess file and select Code Edit
-
At the top of the file insert the following code:
RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} /[SSL Requested page]/ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
- On the 3rd line of code which says "RewriteCond %{REQUEST_URI} /[SSL Requested page]/" change [SSL Requested page] to the page you want to protect.
Example: If contact_us was the name of a page you wanted to protect you could use "RewriteCond %{REQUEST_URI} /contact_us/" - Click the Save Changes button in the top right side.
- Check your website to ensure it is functioning as expected.
Recommended Help Content
How To Force SSL On All Pages In .htaccess File
How to force https on entire website.
htaccess Tutorial
What is the .htaccess file and where can I find more information?
Wildcard SSL Certificates
How to use a WildCard SSL Certificate
Related Help Content
Hotlink Protection
I need to protect the /images folder to not show images when people type in the correct URL like www.mydomain.com/images/ to protect from prying eyes.
Password Protect a File
How do I Password Protect a single file on my website?
PHP pages do not display
If suddenly when you go to your page, you get nothing on the page. You can still get HTML to display, just not PHP. To serve HTML pages to browsers, we don't associate the Apache processes with your 2
Shopping Carts, why and how?
An overview of what shopping carts are available and why you would want to use one.
What Is An SSL Certificate? How Much Is An SSL Certificate?
General Information about SSL Certificates
OSCommerce will not keep my sessions between HTTP and HTTPS.
When I try to log into my OSCommerce shopping cart using https://secure.Bluehost.com/~username url, my shopping cart isn't the same. It is as though I have 2 carts, one for HTTP (unsecure) an
Error Pages
This article explains error pages and how they can be customized.
Password Protect a folder on your website
How do I password protect a folder on my website?