-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
怎么方便地在beego框架中配置nonwww跳到www的http 301功能(需要考虑到static部分)? #88
Comments
这个不是beego能够做到的,这个是你域名的管理里面配置的 |
请教怎么在域名管理配置这个?! CNAME好象搞不定这个 |
这个我也不清楚,但是我是通过域名管理实现的,beego.me www.beego.me你可以测试一下 |
不可以自己判断host吗? ------------------ Original ------------------ Subject: [beego] 怎么方便地在beego框架中配置nonwww跳到www的http 301功能(需要考虑到static部分)? (#88) 所谓nonwww跳到www, 意思是指: baidu.com 会自动跳到 www.baidu.com — |
这个需求跟beego 没什么关系 在dns那里设置一个A记录就可以了 另外 @astaxie github的issuees不是论坛 是不是可以规范下 |
如果想在应用层做的话 可以用nginx的rewrite 在 2013年7月4日下午1:39,notedit notedit@gmail.com写道:
|
这个我也控制不了别人提各种需求的issue啊,只能尽力帮大家解决问题吧 |
谢谢各位大虾的解答, 我说的这个需求确实需要在web服务端实现(nginx,apache,tomcate,php之类的), 不是和beego完全没有关系的。 添加 A 记录, 只能让 beego.me 可以访问, 但做不到 beego.me 自动跳到 www.beego.me ( beego.me 网站也是不能跳转),我google了一些国外的文章也是说必须要用 301来实现. |
像stackoverflow这种,国内也有一些技术的论坛 如果你非常急切,可以直接联系作者 其实一般的问题 google 都能解决 善用google 在 2013年7月5日下午6:53,smithfox notifications@github.com写道:
|
如果你非要302跳转也可以,https://github.com/astaxie/beego/blob/master/docs/zh/Quickstart.md#-6 |
@astaxie , 非常感谢! |
所谓nonwww跳到www, 意思是指: baidu.com 会自动跳到 www.baidu.com
The text was updated successfully, but these errors were encountered: