我添加的域到我的Heroku的項目:Heroku的自定義網址可以作爲重定向而不是別名
$ heroku domains
=== diveintoworld Heroku Domain
diveintoworld.herokuapp.com
=== diveintoworld Custom Domains
Domain Name DNS Target
───────────────────── ───────────────────────────
diveintoworld.com diveintoworld.herokuapp.com
www.diveintoworld.com diveintoworld.herokuapp.com
$ host www.diveintoworld.com
www.diveintoworld.com is an alias for diveintoworld.herokuapp.com.
創建CNAME
記錄在我的域名設置:
www.diveintoworld.com. CNAME diveintoworld.herokuapp.com.
併成立了網絡從diveintoworld.com
重定向到www.diveintoworld.com
。
似乎沒有錯過任何東西,但所有這些東西都像重定向一樣工作。
www.diveintoworld.com->diveintoworld.herokuapp.com
但我需要使我的網站在www.diveintoworld.com
下可用。 (當用戶看到我的網站,他應該可以看到這個網址,而不是在他的地址線Heroku的網址。)
由於它看起來與您的應用程序代碼相關,我們需要查看您的路線以及至少您的家庭控制器操作,以查看是否有任何內容觸發了301. –
@Mark這裏是我的根腳本http://pastebin.com/pm4Ajvni和config.js http://pastebin.com/t7f4e1Kp – rocknow
您是否嘗試用您的自定義域名url替換您的配置哈希中的process.env.HEROKU_URL?只是爲了看看這是否會改變什麼... –