Answer the question
In order to leave comments, you need to log in
Why is the form not being submitted via Ajax?
I use this code to process the form on submission:
<script>
jQuery("form").submit(function() {
var form_data = jQuery(this).serialize();
jQuery.ajax({
type: "POST",
url: "/form1.php",
data: form_data,
success: function(data) {
alert("Accepted. We will contact you within 1 hour!");
}
});
return false;
});
</script>
Mixed Content: The page at ' https://site.ru/ ' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ' site.ru:443 '. This request has been blocked; the content must be served over HTTPS.
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{REQUEST_URI} !^/robots\.txt
RewriteRule !(^$|.*\.(css|jpg|gif|ico|png)) / [R=301 ,L]
RewriteCond %{QUERY_STRING} ^(.+) [NC]
RewriteRule ^(.*)$ /$1? [R=301,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
RewriteRule !(^$|.*\.(css|jpg|gif|ico|png)) / [R=301,L]
/form1.php
will be processed by this rule. RewriteCond %{REQUEST_URI} !^/form1\.php
RewriteCond %{REQUEST_METHOD} !POST
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question