How to Make an AJAX HTTPS GET Request Using jQuery

后端 未结 4 1098
有刺的猬
有刺的猬 2020-12-25 13:46

How can I explicitly make an AJAX HTTPS GET request using jQuery? I am trying to do the following. On an https page, I have a line with the code $.get(\"/resource\")

4条回答
  •  旧巷少年郎
    2020-12-25 14:03

    Just use RewriteRule in your .htaccess file with the specified protocol, for example:

    RewriteCond %{REQUEST_URI} .+[^/]$
    RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L,QSA]
    

提交回复
热议问题