balex
balex

Reputation: 283

Does `GitHub Pages` allow HTTP "Post" method?

I've programmed a little php Script, which just uploads a file from a user to the server.
I've tested in on my XAMMP Server locally, and everything worked fine.

But when i uploaded it to my GitHub Pages Here, It got this error 405 NOT ALLOWED
So i googled a lot and found out that i have to allow the HTTP Post Method.

My Question is now:
How do i allow POST method on my github page?

Thank you in advance.

Upvotes: 12

Views: 11906

Answers (2)

Phiilp A Khoza
Phiilp A Khoza

Reputation: 26

GitHub pages only support static websites/content, PHP doesn't work on GitHub pages and GitHub doesn't allow POST requests.

try netlify, azure , or Heroku ect.

Upvotes: 0

Jonas Czech
Jonas Czech

Reputation: 12348

GitHub pages can only serve static content, and there is no way to run PHP on GitHub pages or upload things. That's why GitHub doesn't allow POST requests.

If you need server side scripting (E.g. PHP), you'll need to use a web host which offers these things.

Upvotes: 11

Related Questions