Ajax call forces redirect from HTTPS to HTTP return 302


Calling an Ajax request from a HTTPS server redirects to the HTTP server causing a 302 redirect return message if the HTTP and HTTPS servers are on different IPs.


Ajax calls through JavaScript will always redirect to HTTP. To remain on the first server, or to return the 200 status regarding of the server, we have to use jQuery Ajax calls.

Also the call is much more simpler, faster and precise:

.load(loadUrl, “getvalues.php=php&id=5”);

About admin

Just another php developer trying to give something back to the community.
This entry was posted in PhP, Script and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s