1
jimmykuu 2012 年 11 月 30 日
定义URL规则就行了
我用Python的Pyramid框架,定义一个/go={what},就可以,/go=xxx, /go=ooo都满足这个规则 如果用框架的话,大部分框架都支持 |
2
leiz 2012 年 11 月 30 日
# go=xxx
def get(self): go = get_argument('go', None) self.redirect('/xxx') |
3
leiz 2012 年 11 月 30 日
self.redirect('/'+go)
|
4
firsthym 2012 年 11 月 30 日
你这个问题有点大。简单来说,就是路由嘛。
|
5
LazyZhu 2012 年 11 月 30 日
nginx
location / { if ( $query_string ~* "go=.*$" ) { return 302 $arg_go; } } test: http://198.74.110.195/?go=http://www.v2ex.com/ |
6
gfreezy 2012 年 12 月 1 日
这种不会对SEO不好吗
|
7
blue5tar 2012 年 12 月 1 日
头像杯子不错
|
8
anyforever 2012 年 12 月 1 日
RE@gfreezy : @LazyZhu 的方法估计对SEO会有影响。
|
11
lemonda 2012 年 12 月 1 日
是想用在wordpress上么?
http://wordpress.org/extend/plugins/redirection/ http://wordpress.org/extend/plugins/shortcodes-ultimate/ http://wordpress.org/extend/plugins/simple-urls/ 还有个gocodes,很久不更新了,会报错,但仍可以用。 |
12
loveminds 2012 年 12 月 2 日
@anyforever 换成301
|
13
anyforever 2012 年 12 月 2 日
@loveminds 据我以前的经验,百度根本无视这些规则。
|