[英]Run app.mydomain.com as mydomain.com/app on Heroku
I have a PHP app running on Heroku (app.herokuapp.com) and it is currently being pointed to app.mydomain.com. 我在Heroku(app.herokuapp.com)上运行了一个PHP应用程序,目前它指向的是app.mydomain.com。 My question would be:
我的问题是:
Is it possible to run app.mydomain.com at mydomain.com/app? 是否可以在mydomain.com/app上运行app.mydomain.com? Basically I would like the app to run in a subfolder as opposed to a subdomain.
基本上,我希望该应用程序在子文件夹而不是子域中运行。
Any help is greatly appreciated. 任何帮助是极大的赞赏。
Thank you! 谢谢!
You cannot in a clean way (you could with iframes, but shouldn't go that way) point your application to a subdirectory in an other application. 您不能以一种干净的方式(您可以使用iframe,但不应那样做)将您的应用程序指向另一个应用程序中的子目录。
That is because when not using the x.herokuapp.com
domain name, you need to use custom domains . 那是因为当不使用
x.herokuapp.com
域名时,您需要使用自定义域 。 These relies on DNS entries to point to an application or an other. 这些依赖于DNS条目来指向应用程序或其他应用程序。
And you cannot create DNS entries for a subdirectory. 并且您不能为子目录创建DNS条目。
What you could do though, is package one application at example.com
, inside which you display whatever you want for the /
url, and you load your application at the /app
url. 但是,您可以做的是在
example.com
打包一个应用程序,在其中显示/
url所需的内容,然后将应用程序加载到/app
URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.