facebook transparent twitter
Go Back  

SawFirst Forum

> SawFirst - About Your Virtual Presence > Websites

Websites Let us know about your website or any other website you find helpful, here.

Reply
 
Thread Tools
  #1  
Old 01-02-2020, 10:24 PM
Pretty Girl's Avatar
Pretty Girl Pretty Girl is offline
POST ADDICT
 
Join Date: Jul 2019
Location: Manila
Posts: 1,542
Default Redirecting http to https

1. Redirect All Web Traffic

If you have existing code in your .htaccess, add the following:
Code:
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

2. Redirect Only a Specific Domain

For redirecting a specific domain to use HTTPS, add the following:
Code:
RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

3. Redirect Only a Specific Folder

Redirecting to HTTPS on a specific folder, add the following:
Code:
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} folder RewriteRule ^(.*)$ https://www.yourdomain.com/folder/$1 [R,L]



Note: Replace “yourdomain” with your actual domain name wherever required. Also, in case of the folder, replace /folder with the actual folder name.
__________________
Reply With Quote
  #2  
Old 01-12-2020, 07:42 PM
Pretty Girl's Avatar
Pretty Girl Pretty Girl is offline
POST ADDICT
 
Join Date: Jul 2019
Location: Manila
Posts: 1,542
Default

Code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule>
__________________
Reply With Quote
Reply

Tags
redirect
Thread Tools



CONTACT US
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.