Is it possible to send POST data with a PHP redirect?

前端 未结 10 2164
一个人的身影
一个人的身影 2021-02-14 05:04

Update: This is NOT a duplicate of How do I send a POST request with PHP?. The solutions there don\'t work for me, they just output the result of the request, I don\'t w

10条回答
  •  逝去的感伤
    2021-02-14 05:44

    If you are the owner of both websites, then you can just include the sites in each .htacess file, that will remain encypted.

    The qualifications for this is SSL CA on both sites.

    in your .htaccess, you do this by: this added in site#1's htaccess:

         RewriteCond %{HTTP_REFERER} !^https://www.site2.com/.*$      [NC]
         RewriteCond %{HTTP_REFERER} !^https://www.site2.com$      [NC]
    

    this added in site#2's htaccess:

         RewriteCond %{HTTP_REFERER} !^https://www.site1.com/.*$      [NC]
         RewriteCond %{HTTP_REFERER} !^https://www.site1.com$      [NC]
    

    Then you can use a standard html form on site#1 like:

           

提交回复
热议问题