Comments (12)
这个不是beego能够做到的,这个是你域名的管理里面配置的
from beego.
请教怎么在域名管理配置这个?!
CNAME好象搞不定这个
from beego.
这个我也不清楚,但是我是通过域名管理实现的,beego.me www.beego.me你可以测试一下
from beego.
不可以自己判断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.
这个需求跟beego 没什么关系 在dns那里设置一个A记录就可以了
另外 @astaxie github的issuees不是论坛 是不是可以规范下
from beego.
如果想在应用层做的话 可以用nginx的rewrite
在 2013年7月4日下午1:39,notedit [email protected]写道:
这个需求跟beego 没什么关系 在dns那里设置一个A记录就可以了
另外 @astaxie github的issuees不是论坛 是不是可以规范下
from beego.
这个我也控制不了别人提各种需求的issue啊,只能尽力帮大家解决问题吧
from beego.
谢谢各位大虾的解答, 我说的这个需求确实需要在web服务端实现(nginx,apache,tomcate,php之类的), 不是和beego完全没有关系的。
添加 A 记录, 只能让 beego.me 可以访问, 但做不到 beego.me 自动跳到 www.beego.me ( beego.me 网站也是不能跳转),我google了一些国外的文章也是说必须要用 301来实现.
from beego.
@notedit ,你说: " @astaxie github的issuees不是论坛 是不是可以规范下",
这类问题应该是什么地方反馈呀 :-)
from beego.
像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.
如果你非要302跳转也可以,https://github.com/astaxie/beego/blob/master/docs/zh/Quickstart.md#-6
使用filter,判断所有的request.host,然后实现跳转
from beego.
@astaxie , 非常感谢!
from beego.
Related Issues (20)
- Could not remove temporary file: remove m.exe HOT 1
- Cannot ignore failure to load conf/app.conf HOT 3
- Custom RecoverFunc Always Executes Before ErrorController Methods
- 建议增加 SetConnMaxIdleTime HOT 1
- Website SSL Certificate Expired HOT 1
- 404/nomatch caused by routers/commentsRouter_controllers.go HOT 1
- Does beego/orm support single-batch transactions? HOT 1
- Using --graceful instead of -graceful since single hyphen is treaded as short version of a flag HOT 3
- 200 nomatch HOT 1
- How to set the keep alive message sending cycle for TCP HOT 1
- Session cookie sameSite property not keeped after SessionRegenerateID
- 为什么主页登陆不上去,从哪里能查询官方文档呢 HOT 1
- Home site beego.gocn.vip return ERR_CONNECTION_REFUSED HOT 1
- 新的文档网站什么时候上线啊?
- Test issue
- ../go/pkg/mod/github.com/beego/[email protected]/router.go:909:44: too many arguments in call to logs.ColorByStatus HOT 1
- beego v1 升级到v2.1.0,有报错 HOT 1
- 当postgresql string的pk值,会返回last insert id is unavailable 58 LastInsertId is not supported by this driver HOT 1
- Beego v1 was upgraded to v2.1.0, and an error was reported
- Improve Validation Error Responses to Use `form` or `json` Tags Instead of Struct Field Names HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beego.