What code should be added When edit redirect http to https in htaccess ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What code should be added When edit redirect http to https in htaccess ?

Redirect Only a Specific Folder

31st May 2020, 12:50 PM
Abdulsalam Al-Ashwal
Abdulsalam Al-Ashwal - avatar
1 Answer
+ 2
Redirecting to HTTPS on a specific folder, add the following: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} folder RewriteRule ^(.*)$ https://www.yourdomain.com/folder/$1 [R,L]
31st May 2020, 1:29 PM
Abdulsalam Al-Ashwal
Abdulsalam Al-Ashwal - avatar