- Joined
- May 16, 2014
- Messages
- 20
- Points
- 1
If you are using an SSL certificate with your domain, you may need to set up a redirect when someone trying to access the domain with HTTP to load it with HTTPS automatically. We can use the following redirections as per your needs:
1. If you need to redirect all HTTP requests to HTTPS, paste the following in the .htaccess configuration:
1. If you need to redirect all HTTP requests to HTTPS, paste the following in the .htaccess configuration:
2. If you need to force SSL on a specific folder inside the home directory you can insert the following code into a .htaccess file placed in that specific folder:RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https......................./$1 [R,L]
*Please replace the domain 'example.com' with the actual domain name.RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} folder
RewriteRule ^(.*)$ https......................../folder/$1 [R,L]