J
J
jww2018-10-03 02:18:25
htaccess
jww, 2018-10-03 02:18:25

Error sending AJAX request?

Good day. When trying to send an AJAX request in the console, the error is:
Mixed Content: The page at ' https://***.com/cargo/calc-temp/ ' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ' http://* **.com/cargo/calc-temp/handler/ '. This request has been blocked; the content must be served over HTTPS.

I tend to believe that the error is in the htaccess file.

RewriteEngine On
Options +FollowSymLinks

Options -Indexes

ErrorDocument 403 /404.php
ErrorDocument 404 /404.php

AddDefaultCharset UTF-8

RewriteEngine On
RewriteCond %{HTTP:PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]

RewriteCond %{THE_REQUEST} ^en\/[A-Z]{3,9}\ /.+\.php/?\ HTTP/
RewriteRule ^\/en\/(.+)\.php/?$ /$1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^\/en\/([^/])\/?$ /en/$1.php [L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.+\.php/?\ HTTP/
RewriteRule ^(.+)\.php/?$ /$1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1.php [L]

RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question