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

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 03-31-2018, 06:09 AM   Postid: 186334
anton.serjogin
Site Owner

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Mar 2018
Posts: 7
Redirecting to https://

Greetings forum!

I am a noob and getting started with my own website in order to grasp the knowledge of the Internet.

So there is a question about redirecting...
For instance, I have a website which is accessible via several types:
1) www.example.com
2) http://example.com
3) https://example.com

How do I set that all of the address-alternatives get redirected to https://example.com or https://www.example.com? Is it somehow possible via the cnc? Sorry for the dumb question, but can not find any straightforward information concerning the topic.

Best Regards, Anton.
anton.serjogin is offline   Reply With Quote
Old 03-31-2018, 06:25 AM   Postid: 186335
 Mike
Service Assistant
 
Mike's Avatar
 
Join Date: Jan 2011
Posts: 256
Re: Redirecting to https://

You would need to create an .htaccess file in your /www directory and add the following code to it:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

And the following Knowledgebase article explains how to create an .htaccess file and upload it to your account:
https://service.futurequest.net/kba89
Mike is offline   Reply With Quote
Old 03-31-2018, 07:18 AM   Postid: 186336
anton.serjogin
Site Owner

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Mar 2018
Posts: 7
Re: Redirecting to https://

Thank you for the information, much appreciated!
anton.serjogin is offline   Reply With Quote
Old 03-31-2018, 08:47 AM   Postid: 186337
anton.serjogin
Site Owner

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Mar 2018
Posts: 7
Re: Redirecting to https://

Unfortunately, the redirection is not working...
I have created a "redirect.htaccess" file in the needed directory with the code mentioned above.
Should I edit something in the code or not? I'm confused.
anton.serjogin is offline   Reply With Quote
Old 03-31-2018, 08:53 AM   Postid: 186338
 Bob
Service Rep
 
Bob's Avatar
 
Join Date: Dec 1999
Location: Jacksonville, Fl
Posts: 5,730
Re: Redirecting to https://

Hello,

The File name must be .htaccess

This Knowledgebase Article may help:
https://Service.FutureQuest.net/kba89

-Bob
Bob is offline   Reply With Quote
Old 03-31-2018, 09:20 AM   Postid: 186339
anton.serjogin
Site Owner

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Mar 2018
Posts: 7
Re: Redirecting to https://

Thanks! Works like a charm now
anton.serjogin is offline   Reply With Quote
Old 03-31-2018, 09:23 AM   Postid: 186340
 Bob
Service Rep
 
Bob's Avatar
 
Join Date: Dec 1999
Location: Jacksonville, Fl
Posts: 5,730
Re: Redirecting to https://

Hi again Anton,

Good deal

-Bob

Psst.... https://www.FutureQuest.net/Community/SiteOwner/
Bob is offline   Reply With Quote
Old 03-31-2018, 09:35 AM   Postid: 186341
anton.serjogin
Site Owner

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Mar 2018
Posts: 7
Re: Redirecting to https://

Hello, Bob.

One last question - how can I redirect the following:

http://example.com => https://example.com

This is the only thing that does not get redirected.

Thanks in advance.
anton.serjogin is offline   Reply With Quote
Old 03-31-2018, 09:50 AM   Postid: 186342
 Bob
Service Rep
 
Bob's Avatar
 
Join Date: Dec 1999
Location: Jacksonville, Fl
Posts: 5,730
Re: Redirecting to https://

As far as I can tell your domain is redirecting from:

http://example.com to https://www.example.com

To change that you would change the domain in your redirect from www.

However if you use the exact code referenced earlier in this thread I believe http://domain.com would redirect to https://domain.com and http://www.domain.com would redirect to https://www.domain.com

Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
-Bob
Bob is offline   Reply With Quote
Old 03-31-2018, 09:56 AM   Postid: 186343
anton.serjogin
Site Owner

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Mar 2018
Posts: 7
Re: Redirecting to https://

Yes, I have already created an extra condition which does:

http://www.example.com => https://www.example.com

Sorry, what I meant was a redirection of the following:

http://example.com => https://www.example.com

Regards, Anton
anton.serjogin 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:23 AM.


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