REST API 应用在域名上无法正常工作。

huangapple go评论93阅读模式
英文:

REST API application does not work on domain

问题

我将我的REST API网络应用迁移到了已注册的域名。在本地主机上,它按预期工作,但是在部署到服务器时,出现了以下错误:

无法加载资源:服务器以404的状态响应()

我使用JS访问REST API。

本地主机http://localhost:8080/EB-Software/apii/user-form/retrieve工作正常,而http://eb-software.uk/EB-Software/apii/user-form/retrieve导致了上述错误。

请帮忙解决。

英文:

I moved my REST API web app to registered domain. On localhost is working as intended, however when deploying to server I get following error

Failed to load resource: the server responded with a status of 404 ()

I use JS to access REST API.

Localhost http://localhost:8080/EB-Software/apii/user-form/retrieve worked perfectly, whereas http://eb-software.uk/EB-Software/apii/user-form/retrieve leads to error above.

Please help

答案1

得分: 1

Update the URL like this, just remove EB-Software

http://eb-software.uk/apii/user-form/retrieve

英文:

Update the URL like this, just remove EB-Software

http://eb-software.uk/apii/user-form/retrieve

huangapple
  • 本文由 发表于 2020年9月24日 03:18:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/64034885.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定