I am able to force https for a domain using this code:
RewriteEngine On
RewriteCond %{ENV:HTTPS} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^index.html$ / [L,R=301]
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*?)/?$ /$1.html [L]
ErrorDocument 404 /404.html
Now I need to make a get request to a strictly http url using fetch jquery using
fetch('http://universities.hipolabs.com/search?country=canada') //api for the get request
.then(response => response.json())
.then(data => showUnis(data) );
How do i add this exception to the .htaccess file so the get request can work? Any help is appreciated in advance.