This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Weird .htaccess behavior
#1
Weird .htaccess behavior
OK, I have sites with just a landing page on them and they are setup with Let's Encrypt certs.

If I type https://suspect.site.com ---> works fine
If I type http://suspect.site.com  ----? Fails to redirect to the https and gives me a "This site cannot be reached" error.

Here is the .htaccess I am trying to use and never recall it being an issue before...

Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

Am I missing something simple? Everything as far as virtual hosts and stuff in Sentora is set up right. This is something I never noticed as my browser was used to changing the address to https: without the redirect even due to address caching. I am stumped. Any ideas? BTW, the sites are live in Sentora, not parked or anything. And there is a single "index.html" file with the .htaccess file in each site's root folder.
Everyone makes mistakes, but to truly screw up it takes the root password!
Reply
Thanks given by:


Messages In This Thread
Weird .htaccess behavior - by worksmarter - 05-04-2017, 12:47 PM
RE: Weird .htaccess behavior - by TGates - 05-05-2017, 02:53 AM
RE: Weird .htaccess behavior - by worksmarter - 05-05-2017, 06:53 AM
RE: Weird .htaccess behavior - by TGates - 05-05-2017, 02:07 PM
RE: Weird .htaccess behavior - by worksmarter - 05-05-2017, 02:23 PM
RE: Weird .htaccess behavior - by TGates - 05-05-2017, 04:06 PM
RE: Weird .htaccess behavior - by worksmarter - 05-05-2017, 04:29 PM
RE: Weird .htaccess behavior - by TGates - 05-06-2017, 02:41 AM
RE: Weird .htaccess behavior - by worksmarter - 05-06-2017, 09:01 AM
RE: Weird .htaccess behavior - by TGates - 05-06-2017, 11:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Global .htaccess for Sentora and/or Apache rsthomas 2 6 ,469 01-13-2020, 06:52 AM
Last Post: Vedran B
.htaccess has stopped working? tbrady85 2 7 ,187 09-08-2017, 01:56 AM
Last Post: TGates
unexpected vhost/ssl behavior worksmarter 5 13 ,041 03-10-2017, 08:05 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 3 Guest(s)