0

I know you can't run PHP on Amazon S3, but is there a way to host a static site on S3 and then have a contact form that runs using PHP from another server? In essence, I'm asking if the PHP file needs to be on S3 for it to run properly?

1
  • yes, or you could run php on ec2. the php file has to be on the server with php running, but a form(html page) with out php could be on s3 and point to another server Commented Jul 4, 2013 at 3:20

1 Answer 1

1

No, the PHP file does not have to be on S3. Just put it on the other server and refer to the absolute (full) URL.

  • Pages can submit forms to other domains (e.g. to the PHP server). This is actually what makes CSRF possible even when a server requires POST requests.
  • Pages can load images, scripts, and stylesheets from other domains. In fact, it is very common for these assets to be loaded from separate servers or even third-party content delivery networks. For example, Stack Overflow loads its copy of jQuery from //ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.