是否可以使用apache .htaccess基于URL的查询字符串应用HTTP头指令?
例如,根据此资源http://code.google.com/web/controlcrawlindex/docs/robots_meta_tag.html标题为"实际实施X-Robots-Tag with Apache"一节,它说明了以下.htaccess文件指令可以使用:
<Files ~ "\.pdf$">
Header set X-Robots-Tag "noindex, nofollow"
</Files>
Run Code Online (Sandbox Code Playgroud)
我正在寻找以下内容:
<QueryString ~ "m=_!">
Header set X-Robots-Tag "noindex, nofollow"
</QueryString>
Run Code Online (Sandbox Code Playgroud)
这样,搜索引擎就不会将以下网址编入索引:
http://domain.com/?m=_!ajax_html_snippet
Run Code Online (Sandbox Code Playgroud)
任何提示/提示/线索将非常感激.谢谢.
如何将mapView集中在MKAnnotationView的calloutAccessory上?我知道如何将地图置于实际的annotationView中心,但我不知道如何将地图置于annotationView的calloutAccessory中心.有任何想法吗?
// This centers the map on the MKAnnotationView. However, I need to be able to
// center the map on the MKAnnotationView's calloutAccessory.
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
id<MKAnnotation> annotation = view.annotation;
[self.mapView setCenterCoordinate:[annotation coordinate] animated:YES];
}
Run Code Online (Sandbox Code Playgroud) 在PHP(这是我最熟悉的)中,它是一个单行表达式:
strpos('abc', 'b') !== false
Run Code Online (Sandbox Code Playgroud)
什么是Objective C等价物?
什么是有效地将敲击手势添加到UICollectionViewCell从其返回的子视图的最佳方法是什么dequeueReusableCellWithReuseIdentifier,已经附加了一堆默认手势识别器(例如a UIScrollView).我是否需要检查并查看我的一个自定义手势是否已附加(scrollView.gestureRecognizers),如果没有,则添加它?我需要我的应用程序的滚动尽可能顺利,因此检查的性能和已经创建的资源的有效重用是关键.这段代码都发生在里面cellForItemAtIndexPath.谢谢.
我的收藏视图效果很好.它显示了一个照片网格,并列出了数百个照片.您可以垂直滑动以全部滚动它们.生活很好.但是,我现在有了新的要求.我需要能够检测用户何时向左或向右滑动.我需要能够拦截这个手势,这样我就可以将行为附加到左右滑动,同时保持我的集合视图的垂直滚动功能.有任何想法吗?
ios ×3
objective-c ×2
.htaccess ×1
http-headers ×1
mapkit ×1
mkmapview ×1
nofollow ×1
noindex ×1
query-string ×1