1
pimin 2014 年 8 月 23 日
如果你坚持跳转,domain.com/about只是过去式,阵痛罢了
|
2
roychan 2014 年 8 月 23 日
不会吧……我都是 rewrite 301 permanent
|
3
Tink PRO 怎么可能,应该是会跳转的啊
|
6
Lucius 2014 年 8 月 23 日
rewrite 301
|
8
Lucius 2014 年 8 月 23 日 @raycloud
RewriteEngine On RewriteCond %{HTTP_HOST} ^v2ex.com [NC] RewriteRule ^(.*)$ http://www.v2ex.com/$1 [L,R=301] |
9
maikcn 2014 年 8 月 23 日 nginx
``` server { listen 80; server_name example.com; return 301 http://www.example.com$request_uri; } ``` |
10
hzqim 2014 年 8 月 23 日 example.com用来短地址服务,访问example.com直接跳转到www.example.com,访问example/xxx就跳转到缩短的地址。
server{ listen 80; server_name example.com rewrite ^()$ http:www.example.com permanent; } server{ listen 80; server_name www.example.com; ... } |
13
lenye 2014 年 8 月 23 日 |
14
yjsslab 2014 年 8 月 23 日
为什么还用 www 呢?不时髦了。
|
16
maikcn 2014 年 8 月 23 日 @raycloud 一般都让 nginx 反向代理内部的 tomcat
一定要让 tomcat 识别的话,一般在Java程序中用 urlrewrite 的工具来做跳转,大概这样 http://nematodes.org/martin/2010/02/04/301-permanent-redirect-with-tomcat-howto/ |
18
14 2014 年 8 月 23 日
CNAME到裸域名
|
19
Exin 2014 年 8 月 23 日
好久不用www了……
|
20
Laobai 2014 年 8 月 23 日
重定向
|
21
lecher 2014 年 8 月 23 日 小站不用www无所谓。
但是如果域名下面有多个产品,还是用www比较好。 因为裸域名下面的cookie是全域名通用的。就是说 v2ex.com下面设置的cookie,到other.v2ex.com的页面上,也是可以使用的。 大部分 CDN 也不支持裸域。 Rio 在知乎上有专门的解释。裸域名好处不多,但是坏处缺不少。 http://www.zhihu.com/question/20414602 |