Author |
|
Doug22
Joined: 02 Jun 2013 Posts: 60 Location: Houston TX
|
Posted: Fri 05 Sep '25 3:38 Post subject: http versus https |
|
|
Not quite an Apache-specific problem so apologies for that, but I am puzzled. I have a website that is SSL certified for https, but my (Hostgator) logs tell me that many people access it with http. All of my links to it are https. You'd think that when they click on one of my links to it, it would default to https. So what's going on? Are there browsers that refuse to use https and default to http? |
|
Back to top |
|
mrdj1024
Joined: 03 Apr 2023 Posts: 73 Location: Bridgeton,NJ,USA
|
Posted: Fri 05 Sep '25 6:33 Post subject: |
|
|
hi!,you can make an .htaccess file and have it redirect all http requests to https automatically
open a notepad
add the following text to it(copy and paste)
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
------------------------------------------------------------
save it as .htaccess and put it in your main website folder(usually where index.html is) |
|
Back to top |
|
Doug22
Joined: 02 Jun 2013 Posts: 60 Location: Houston TX
|
Posted: Fri 05 Sep '25 14:31 Post subject: |
|
|
Thank you. That's helpful in keeping things organized. But WHY are many of my requests http? All the links to my site that I advertise are https, so someone clicks on those and ends up connecting by http. There must be some popular browser that INSISTS on connecting by http, or else people somehow explicitly choose to do so. |
|
Back to top |
|
Doug22
Joined: 02 Jun 2013 Posts: 60 Location: Houston TX
|
Posted: Fri 05 Sep '25 15:55 Post subject: |
|
|
Ah, now that's interesting. The majority of IPs that hit me up with http accesses are identified as being from Russia. Is that understandable? |
|
Back to top |
|
Stray78

Joined: 15 Apr 2024 Posts: 44 Location: USA
|
Posted: Fri 05 Sep '25 22:00 Post subject: |
|
|
I do this. In my vhost section I redirect...
Code: | <VirtualHost *:80>
# Server Stuff #
ServerName webmail.mysite.com
DocumentRoot "Z:/webmail"
# Logging Stuff #
CustomLog "Z:/logs/Apache/HTTP/Webmail.log" "combined" env=!dontlog
# HTTPS Redirect #
Redirect permanent / https://webmail.mysite.com/
</VirtualHost> |
|
|
Back to top |
|