Dopamin3
Gawd
- Joined
- Jul 3, 2009
- Messages
- 870
I have a website built in React that never had an SSL certificate but now does. The host is using Apache.
The current .htaccess file (which works manually on http:// or https:// but doesn't FORCE https://) is:
I tried just adding this to the top of the .htaccess file but browsers give ERR_TOO_MANY_REDIRECTS
I'm derping on how to correct this.
The current .htaccess file (which works manually on http:// or https:// but doesn't FORCE https://) is:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
I tried just adding this to the top of the .htaccess file but browsers give ERR_TOO_MANY_REDIRECTS
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I'm derping on how to correct this.