Giter VIP home page Giter VIP logo

Comments (12)

astaxie avatar astaxie commented on May 22, 2024

这个不是beego能够做到的,这个是你域名的管理里面配置的

from beego.

smithfox avatar smithfox commented on May 22, 2024

请教怎么在域名管理配置这个?!

CNAME好象搞不定这个

from beego.

astaxie avatar astaxie commented on May 22, 2024

这个我也不清楚,但是我是通过域名管理实现的,beego.me www.beego.me你可以测试一下

from beego.

nevernet avatar nevernet commented on May 22, 2024

不可以自己判断host吗?

------------------ Original ------------------
From: "smithfox"[email protected];
Date: Wed, Jul 3, 2013 10:22 PM
To: "astaxie/beego"[email protected];

Subject: [beego] 怎么方便地在beego框架中配置nonwww跳到www的http 301功能(需要考虑到static部分)? (#88)

所谓nonwww跳到www, 意思是指: baidu.com 会自动跳到 www.baidu.com


Reply to this email directly or view it on GitHub.

from beego.

notedit avatar notedit commented on May 22, 2024

这个需求跟beego 没什么关系 在dns那里设置一个A记录就可以了

另外 @astaxie github的issuees不是论坛 是不是可以规范下

from beego.

notedit avatar notedit commented on May 22, 2024

如果想在应用层做的话 可以用nginx的rewrite

在 2013年7月4日下午1:39,notedit [email protected]写道:

这个需求跟beego 没什么关系 在dns那里设置一个A记录就可以了

另外 @astaxie github的issuees不是论坛 是不是可以规范下

from beego.

astaxie avatar astaxie commented on May 22, 2024

这个我也控制不了别人提各种需求的issue啊,只能尽力帮大家解决问题吧

from beego.

smithfox avatar smithfox commented on May 22, 2024

谢谢各位大虾的解答, 我说的这个需求确实需要在web服务端实现(nginx,apache,tomcate,php之类的), 不是和beego完全没有关系的。

添加 A 记录, 只能让 beego.me 可以访问, 但做不到 beego.me 自动跳到 www.beego.me ( beego.me 网站也是不能跳转),我google了一些国外的文章也是说必须要用 301来实现.

from beego.

smithfox avatar smithfox commented on May 22, 2024

@notedit ,你说: " @astaxie github的issuees不是论坛 是不是可以规范下",

这类问题应该是什么地方反馈呀 :-)

from beego.

notedit avatar notedit commented on May 22, 2024

像stackoverflow这种,国内也有一些技术的论坛 如果你非常急切,可以直接联系作者

其实一般的问题 google 都能解决 善用google

在 2013年7月5日下午6:53,smithfox [email protected]写道:

@notedit https://github.com/notedit ,你说: " @astaxiehttps://github.com/astaxiegithub的issuees不是论坛 是不是可以规范下",

这类问题应该是什么地方反馈呀 :-)


Reply to this email directly or view it on GitHubhttps://github.com/astaxie/beego/issues/88#issuecomment-20513242
.

from beego.

astaxie avatar astaxie commented on May 22, 2024

如果你非要302跳转也可以,https://github.com/astaxie/beego/blob/master/docs/zh/Quickstart.md#-6
使用filter,判断所有的request.host,然后实现跳转

from beego.

smithfox avatar smithfox commented on May 22, 2024

@astaxie , 非常感谢!

from beego.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.