405 (Method Not Allowed) on AJAX request only when using DNS

前端 未结 1 1350
故里飘歌
故里飘歌 2021-01-24 11:52

I have a really weird problem, I use AJAX to send an email from my html page, which links to a PHP page I have within the SAME website. The AJAX request works fine when I enter

1条回答
  •  南笙
    南笙 (楼主)
    2021-01-24 12:29

    I finally found the problem, I don't know how I didn't see due to my lack of experience with Servers and stuff. Long story short : I installed Wamp on the server, I used the IP+Port to access it, but when I use the DNS it directly points to the website files(including php files) and it didn't go through Wamp.

    I ended up uninstalling Wamp and including PHP in my IIS server to directly compile PHP files without the need to install another server.

    I followed this tutorial -> How to Install PHP on IIS 7 for Windows Server 2008

    0 讨论(0)
提交回复
热议问题