dongmi1663 2016-04-12 16:23
浏览 18
已采纳

新版谷歌应用引擎产生404错误(PHP 5.5)

I have a site running through google app engine on runtime environment php 5.5. I am trying to deploy a new version of the app (I do this by changing the version number in app.yaml, reference here: Configuring with app.yaml) and deploying the app.

My current site can be reached via www.my-app-name.appspot.com (which works fine) and I should be able to view my new app version at www.2-dot-my-app-name.appspot.com, however I get a 404 error when trying to view version 2.

Version 1 and version 2 of my app are identical, the only difference being that version 2 has "2" as the version in app.yaml. Did I miss a step here? Is there something I need to do as far as configuration goes to view version 2? (Note: I do not want to make version 2 live, I just want to deploy it and test it to see if some changes work before making it live).

Edit: I tried testing to see what routing all traffic to version 2 of my app would do. In this case, version 2 of the app works but version 1 does not. It looks like when all traffic is routed to a particular version, that version is served up with the url "myappname.appspot.com". Any other versions are served using the url "version-dot-myappname.appspot.com". Anyone know how I can configure my app so that these urls work?

  • 写回答

2条回答 默认 最新

  • doutu1939 2016-04-12 19:10
    关注

    I discovered what the culprit was. I had a PHP configuration file that changed the header location to 'http://www.'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']. Though this type of configuration will work for your default app, it will not work when testing a new version because when testing a new version the routing cannot contain the leading 'www'. Hope this helps someone else down the line who encounters the same problem.

    Note: If you use traffic splitting, users will not have any issues accessing your new version as long as your custom domain is mapped correctly.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。