FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 04-05-2017, 05:33 PM   Postid: 185767
tswebdvelpr
Registered User

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Apr 2017
Posts: 3
how to make my website load https by default

Hi guys,

Can anyone tell me how to force my website to load httpS even if they type in www.qlsvideoprogram.com I would like the website to always load the secure (https) URL.

This website (www.qlsvideoprogram.com) is hosted here at futurequest.

Any help is greatly appreciated

Best regards,

Tony States
tswebdvelpr is offline   Reply With Quote
Old 04-05-2017, 06:03 PM   Postid: 185768
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,986
Re: how to make my website load https by default

You can put this code into your .htaccess file in the root of the site:
Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
This will tell any browser that hits your site on port 80 (http) to use https instead and that the redirection is permanent (301) vs temporary (302).

Note that if you already have rewrites don't turn RewriteEngine On multiple times.

__________________
Kevin
Kevin is offline   Reply With Quote
Old 04-05-2017, 06:39 PM   Postid: 185769
tswebdvelpr
Registered User

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Apr 2017
Posts: 3
Re: how to make my website load https by default

Thank you very much for the speedy response Kevin,

I added your code into a new .htaccess file and it is working perfect!!!



Best regards,

Tony States
tswebdvelpr is offline   Reply With Quote
Old 04-07-2017, 07:45 AM   Postid: 185770
Stefanimoma
Registered User

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Apr 2017
Location: Gottenborg, Sweden
Posts: 1
Re: how to make my website load https by default

Quote:
Originally Posted by Kevin View Post
You can put this code into your .htaccess file in the root of the site:
Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
This will tell any browser that hits your site on port 80 (http) to use https instead and that the redirection is permanent (301) vs temporary (302).



Note that if you already have rewrites don't turn RewriteEngine On multiple times.
Hey! I'm struggling with the same problem but adding the code you provided didn't help me. Nothing has changed, it's still loading http and FireFox is alerting about insecure forms. What might be the reason? Which permissions should .htaccess file have?
Stefanimoma is offline   Reply With Quote
Old 04-07-2017, 12:26 PM   Postid: 185771
tswebdvelpr
Registered User

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Apr 2017
Posts: 3
Re: how to make my website load https by default

Hi Stef,
I had a similar problem with my forms too! it is very difficult but you must determine what is insecure --- there are links to some code somewhere that is not a secure link, I found mine and sent an email to the form company and told them about it and they actually fixed the insecure links. When I added the code into my .htaccess file I actually did not even have one created so my file was brand new, maybe that is why mine is working and yours is not.
Best of luck, Tony States
tswebdvelpr is offline   Reply With Quote
Old 04-07-2017, 12:30 PM   Postid: 185772
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,986
Re: how to make my website load https by default

Quote:
Originally Posted by Stefanimoma View Post
Hey! I'm struggling with the same problem but adding the code you provided didn't help me. Nothing has changed, it's still loading http and FireFox is alerting about insecure forms. What might be the reason? Which permissions should .htaccess file have?
What site is it?

BTW, it can't be a permissions problem. If apache sees that there is a .htaccess file that it can't read it will refuse to serve out anything from the directory.
__________________
Kevin
Kevin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:22 AM.


Running on vBulletin®
Copyright © 2000 - 2019, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2019 FutureQuest, Inc.
FutureQuest, Inc.