简体   繁体   English

在Heroku上将app.mydomain.com作为mydomain.com/app运行

[英]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.

相关问题 Symfony 为 mydomain.com/parameter 创建路由 - Symfony create routing for mydomain.com/parameter 网址重写:将mydomain.com/index.php更改为mydomain.com/home - URL rewriting: Change mydomain.com/index.php to mydomain.com/home PHP邮件未从mydomain.com发送到Google应用程序电子邮件myname@mydomain.com - PHP mail is not sending from mydomain.com to the google apps email myname@mydomain.com Laravel 4.1使用301永久重定向将所有请求从www.mydomain.com重定向到mydomain.com - Laravel 4.1 Redirect all requests from www.mydomain.com to mydomain.com with 301 permanent redirect 如何在Codeigniter中使用mobiledetect.net将mydomain.com重定向到m.mydomain.com? - How to redirect mydomain.com to m.mydomain.com with mobiledetect.net in codeigniter? 使用PHP / Nginx将cookie域从无域迁移到.mydomain.com - Migrate cookie domain from no domain to .mydomain.com with PHP/Nginx 使用PHP设置“ mydomain.com/username”的任何简单,整洁的方法吗? - Any easy, noncluttering way to set up “mydomain.com/username” using PHP? .href.replace给我双重域名(http:// localhosthttp://mydomain.com) - .href.replace giving me double domain (http://localhosthttp://mydomain.com) 如何使用zend框架获取像mydomain.com/username这样的动态URL - how to get dynamic URL like mydomain.com/username using zend framework 如何调试“ Waiting For mydomain.com” Web请求陷入等待状态 - How to debug “Waiting For mydomain.com” web-request getting stuck at pending state
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM