robots中伪静态路径怎么写

#1 hongrui

spUrl(main,index,array('city'=>$city,'slug'=>$slug));
伪静态路径为  /$city/$slug.html

如何在robots中只允许访问这个路径
Allow: /index.php?c=main&a=index  这样写可以吗

2014-06-18 09:59:50

#2 jake

robots一般是按伪静态生成后的url来匹配会好点,如

Allow: /guangzhou/*.html

具体要参考robots的文档 http://baike.baidu.com/view/9274458.htm?fromtitle=robots.txt&fromid=9518761&type=search

2014-06-18 10:44:58

#3 hongrui

谢谢jake

2014-06-18 11:25:07