问题描述
我不想索引“author”子目录中的所有网站/URL。
示例:
import 'package:Flutter/material.dart';
import 'package:Flutter/services.dart';
class TestDetailsScreen extends StatefulWidget {
static final String routeName = '/test-details-screen';
@override
_TestDetailsScreenState createState() => _TestDetailsScreenState();
}
class _TestDetailsScreenState extends State<TestDetailsScreen>
with SingleTickerProviderStateMixin {
ScrollController _scrollController;
AnimationController _animationController;
Animation _animation;
@override
void initState() {
super.initState();
_scrollController = new ScrollController();
_scrollController.addListener(() => setState(() {}));
_animationController = AnimationController(
duration: Duration(milliseconds: 250),vsync: this,);
_animation = Tween(begin: 1.0,end: 0.0).animate(_animationController);
}
@override
void dispose() {
_scrollController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final double defaultTopMargin = 190.0 - 4.0;
double top = defaultTopMargin;
if (_scrollController.hasClients) {
double offset = _scrollController.offset;
top -= offset;
}
if (top <= 75.0 && _animation.isdismissed) {
_animationController.forward();
} else if (top >= 75.0 && _animation.isCompleted) {
_animationController.reverse();
}
return Scaffold(
body: Stack(
children: [
CustomScrollView(
controller: _scrollController,slivers: [
SliverAppBar(
pinned: true,floating: false,expandedHeight: 190.0,iconTheme: IconThemeData(
color: Theme.of(context).primaryColorLight,),flexibleSpace: FlexibleSpaceBar(
title: Text(
'Add inputs',style: TextStyle(
color: Theme.of(context).primaryColorLight,fontSize: 16.0,background: Image.asset(
'assets/images/clouds.jpg',fit: BoxFit.cover,actions: [
IconButton(
icon: const Icon(Icons.check),onpressed: () {},],SliverList(
delegate: SliverChildListDelegate.fixed([
Padding(
padding: const EdgeInsets.only(left: 10,right: 10),child: SizedBox(
width: double.infinity,child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 25),child: Card(
color: Theme.of(context).primaryColorLight,shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),elevation: 0,margin: EdgeInsets.all(5),child: Padding(
padding: const EdgeInsets.all(20.0),child: Column(
children: [
TextFormField(
decoration: const Inputdecoration(
border: const UnderlineInputBorder(),labelText: 'Your text',TextFormField(
decoration: const Inputdecoration(
border: const UnderlineInputBorder(),Padding(
padding: const EdgeInsets.only(top: 10),margin: const EdgeInsets.all(5),child: Column(
children: [
Align(
alignment: Alignment.topLeft,child: const Text(
'Additional Details (Optional)',Row(
children: [
Expanded(
child: TextFormField(
decoration: const Inputdecoration(
border:
const UnderlineInputBorder(),Padding(
padding: const EdgeInsets.all(
10,Expanded(
child: TextFormField(
decoration: const Inputdecoration(
border:
const UnderlineInputBorder(),Row(
children: [
Expanded(
child: TextFormField(
decoration: Inputdecoration(
border:
const UnderlineInputBorder(),hintStyle: Theme.of(context)
.textTheme
.caption,Padding(
padding: EdgeInsets.all(
10,Expanded(
child: TextFormField(
maxLength: 4,keyboardType: TextInputType.number,decoration: const Inputdecoration(
border:
const UnderlineInputBorder(),counterText: '',Row(
children: [
Expanded(
child: TextFormField(
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp('[a-zA-Z]'))
],Expanded(
child: FractionallySizedBox(
alignment: Alignment.centerLeft,child: TextFormField(
keyboardType:
TextInputType.number,decoration: Inputdecoration(
alignLabelWithHint: false,border:
const UnderlineInputBorder(),labelText: 'Your choices',labelStyle: const TextStyle(
height: 1,suffix: const Text(
'Measurement',style: const TextStyle(
fontSize: 16,Row(
children: [
Expanded(
child: IconButton(
icon: Icon(
Icons.archive,color: Theme.of(context).primaryColorDark,Expanded(
child: IconButton(
icon: Icon(
Icons.delete,)
],)
],]),)
],AnimatedBuilder(
animation: _animation,builder: (BuildContext context,Widget child) {
return Positioned(
top: top <= 50 ? 50 : top,right: 16.0,child: new Transform(
transform: new Matrix4.identity()..scale(_animation.value),alignment: Alignment.center,child: Opacity(
opacity: _animation.value,child: new FloatingActionButton(
elevation: 0,backgroundColor: Theme.of(context).primaryColorDark,onpressed: () => {},child: new Icon(
Icons.photo,color: Theme.of(context).primaryColorLight,);
},)
],);
}
}
.htaccess 似乎是正确的地方。
我发现了一些应该可以但没有的代码
example.com/author/torben
example.com/author/lucy
example.com/author/*
出了点问题
<If "%{REQUEST_URI} =~ m#^/author/#">
Header set X-Robots-Tag "noindex"
</If>
不显示无索引。
我做错了什么? 谢谢你的帮助。非常感谢
编辑:
curl -I https://www.example.com/author/torben
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)