Force SSL

Status
This thread has been locked.

MichaelJ1

Banned
Feedback score
0
Posts
15
Reactions
1
Resources
0
Hi. I'm using cPanel for my website anyway I try to force my website to SSL. I try to connect, it display that page:

{{Domain}} redirect to many time.
I have correct stuff at .htaccess. But I don't know why it's not working.

Contact me if you can help me! Thanks.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

1amDev

Designer & Developer
Supreme
Feedback score
30
Posts
511
Reactions
844
Resources
0
Hi. I'm using cPanel for my website anyway I try to force my website to SSL. I try to connect, it display that page:

{{Domain}} redirect to many time.
I have correct stuff at .htaccess. But I don't know why it's not working.

Contact me if you can help me! Thanks.
Hey there,

Make sure you have a correct SSL working and set up first off. Then make an .htaccess file in your website with the following lines in it:
Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]

If that doesn't work, you may need to check and make sure your htaccess file is correct or contact your host for further support. Hopefully I helped somewhat.

Best regards,
Michael // 1amDev
 
Last edited:

MichaelJ1

Banned
Feedback score
0
Posts
15
Reactions
1
Resources
0
Hey there,

Make sure you have a correct SSL working and set up first off.Then make an .htaccess file in your website with the following lines in it:
Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]

If that doesn't work, you may need to check and make sure your htaccess file is correct or contact your host for further support. Hopefully I helped somewhat.

Best regards,
Michael // 1amDev
Can you show us your .httaccess code?

That's my code
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ {{domain}}.com/$1 [R,L]
ErrorDocument 404 /error.php[DOUBLEPOST=1509906928][/DOUBLEPOST]
Hey there,

Make sure you have a correct SSL working and set up first off.Then make an .htaccess file in your website with the following lines in it:
Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]

If that doesn't work, you may need to check and make sure your htaccess file is correct or contact your host for further support. Hopefully I helped somewhat.

Best regards,
Michael // 1amDev
I keep receiving this page error;

This page isn’t working
{{domain}} redirected you too many times.



  • Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
 
Last edited:
Banned forever. Reason: Ban Evading (TylerNovak)

Jay

regret nothing
Premium
Feedback score
13
Posts
532
Reactions
211
Resources
0
I believe you're supposed to replace {{domain}} with your actual domain.
 

MichaelJ1

Banned
Feedback score
0
Posts
15
Reactions
1
Resources
0
I believe you're supposed to replace {{domain}} with your actual domain.
Yep I know, I'm writing {{domain}} on here as its private domain and cannot be shared yet[DOUBLEPOST=1509907249][/DOUBLEPOST]My domain already connected to CloudFlare. How do I enable SSL from cloudflare?
 
Last edited:
Banned forever. Reason: Ban Evading (TylerNovak)

PajserSima

Supreme
Feedback score
13
Posts
185
Reactions
83
Resources
1
Yep I know, I'm writing {{domain}} on here as its private domain and cannot be shared yet[DOUBLEPOST=1509907249][/DOUBLEPOST]My domain already connected to CloudFlare. How do I enable SSL from cloudflare?
If you are on CloudFlare try adding page rules.
 

PajserSima

Supreme
Feedback score
13
Posts
185
Reactions
83
Resources
1
You should find Page Rules button in your panel, you will get form to choose what rule you need and you will choose "Always use HTTPS"

After that in a text box you get offered type "http://(domain).com"

Don't touch anything else, im not CF user so this is my memory on how to do it but im sure its like that.
 

MichaelJ1

Banned
Feedback score
0
Posts
15
Reactions
1
Resources
0
Thanks.

Do I have to remove RewriteRule ^(.*)$ {{domain}}.com/$1 [R,L] to let it works or its fine if it stays. Because for me right now when ever I remove it, cloudflare SSL works.
 
Banned forever. Reason: Ban Evading (TylerNovak)

PajserSima

Supreme
Feedback score
13
Posts
185
Reactions
83
Resources
1
Thanks.

Do I have to remove RewriteRule ^(.*)$ {{domain}}.com/$1 [R,L] to let it works or its fine if it stays. Because for me right now when ever I remove it, cloudflare SSL works.
Yes, remove that from .htaccess .
 
Status
This thread has been locked.
Top