I am having a problem with jQuery's ajax method over https.
The whole site is served over https. Most forms are submitted to a processing page via ajax. The url for the ajax function is basically:
$.ajax({
"/assets/php/ajax/processor.php",
...
});
I also have a .htaccess file which redirects all http requests to https ones like so:
# Redirect any http requests to https
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L]
The ajax works fine if I remove the redirect in the .htaccess file, but will not seem to work with it there. I assume this is because ajax functions over http (jQuery description of .ajax(): Perform an asynchronous HTTP (Ajax) request) and therefore the .htaccess redirect is catching the ajax request.
I need the redirect because I don't want users of the site to use the http version (there is a sign in header on every page) but i need the ajax to work too and be secured by https.
Thanks in advance for any help