@Rohit
You have had helped me with the following script for https:
Dear Rohit
#First redirect all Http request to https
#Ensure that we exclude any sub-domains
RewriteCond %{HTTP_HOST} ^(www\.)?myhotfb.com$ [NC]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.myhotfb.com%{REQUEST_URI} [NC,L,R]
#Secondly redirect all non-www to www
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [NC,L,R]
The above script turns of https for subdomain, but I have a subdomain.myhotfb.com for which I want to have https working. I already have lets encrypt installed for the subdomain.myhotfb.com. What can be done? Any thoughts.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- MyHoTFB.COM ®@myHoTFB
MyHoTFB.COM ® - 0 likes
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 1 like
- MyHoTFB.COM ®@myHoTFB
MyHoTFB.COM ® - 0 likes
- MyHoTFB.COM ®@myHoTFB
MyHoTFB.COM ® - 0 likes
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 0 likes
You must log in to post replies.should I use the following for subdomain
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Create a separate .htaccess file under subdomain.myhotfb.com root folder.
Thanks Rohit... thanks a lot sir.
@Rohit,
Just to clarify the line RewriteCond %{HTTP_HOST} ^subdomain\.myhotfb\.com$ [NC]
here "^subdomain" gets replaced with the actual subdomain correct?
if your sub domain is abc then the line in your htaccess would be: