当前位置: 首页 > news >正文

上海800做网站微商引流的最快方法是什么

上海800做网站,微商引流的最快方法是什么,个人创业怎样开公司,海口建设工程信息网站常用的nginx正则表达式 ^匹配以...开头的字符串$匹配以...结尾的字符串^$^$表示空行*匹配前面的字符0次或者多次(通配符*表示任意数量的任意字符)匹配前面的字符1次或多次?匹配前面的字符0次或1次.匹配除了“\n”之外的任意单个字符,[.\n]表…

常用的nginx正则表达式

^匹配以...开头的字符串
$匹配以...结尾的字符串
^$^$表示空行
*匹配前面的字符0次或者多次(通配符*表示任意数量的任意字符)
+匹配前面的字符1次或多次
?匹配前面的字符0次或1次
.匹配除了“\n”之外的任意单个字符,[.\n]表示匹配包括“\n”在内的任意字符
.*匹配前面的任意1个字符,字符可以不存在
.+匹配前面的任意1个字符,字符必须存在
\将后面接着的字符记为一个特殊字符或者一个原意字符或一个向后引用
\n匹配换行符 
\t匹配制表符
\r匹配回车符
\d匹配纯数字
\w 匹配任意字母、数字或下划线
\s匹配任意空白符
{n}表示匹配前面的字符n次
{n,}匹配前面的字符至少n次
{n,m}匹配前面的字符n-m次
|表示或
()表示表达式整体

location和rewrite的区别

  • location 通过前缀或正则匹配用户的URL访问路径做页面跳转、访问控制和代理转发
  • rewrite 对用户的URL访问路径进行重写,再重定向跳转访问重写后的路径http://www.xy101.com/scj.jgp  ->  http://www.xy101.com/error.png

一、location

1.location常用匹配类型

精准匹配、一版匹配、正则匹配

  • location  URL路径       一般前缀匹配
  • location = URL路径      精准匹配
  • location ^~ URL路径     前缀匹配
  • location ~ URL路径      正则匹配,区分大小写
  • location ~* URL路径     正则匹配,不分区大小写
  • location !~ URL路径     正则匹配取反
  • location !~* URL路径    正则匹配取反,不分区大小写

2.location匹配机制

优先级:精准匹配 =  >  最长前缀匹配 ^~  >  正则匹配 ~ ~* !~ !~*  >  一般前缀匹配 /XXXX  >  通用匹配 /

在没有合适的精准匹配的情况下,先看前缀匹配的长度,取最长匹配的location(如果此最长匹配是带有^~的则不再看正则匹配;如果此最长匹配是不带有^~的则会继续再看正则匹配)。

3.实际工作中三大匹配规则

1.网站首页匹配

location = / {
    root 网页根目录;
    index index.html;
}

2.网站静态页面,通过前缀匹配或通用匹配在nginx服务器本地处理

location ~ /static/ {
    root 目录;
}

location / {
    root 目录;
}

3.网站动态页面,通过匹配不同的动态网页文件后缀转发给不同的后端应用服务器处理

location \.php$ {
    fastcgi_pass PHP服务器地址:端口;
}

location \.jsp$ {
    proxy_pass TOMCAT服务器地址:端口;
}
 

二、rewrite

1.rewrite格式

rewrite  正则表达式  重写的地址  [标记位];

标记位说明
last本条规则匹配完成后,不终止重写后的url匹配,一般用在 server 和 if 中
break本条规则匹配完成即终止,终止重写后的url匹配,一般使用在 location 中
permanent返回302临时重定向,浏览器地址会显示跳转后的URL地址
redirect返回301永久重定向,浏览器地址栏会显示跳转后的URL地址

2.rewrite默认情况下只对从域名后面的根目录 / 开始到传递参数的 ? 号前面的URL路径进行重写

#默认只对域名后面的URL部分重写
rewrite 正则表达式 /新URL;    http://域名/旧URL  ->  http://域名/新URL  #如果需要全域名路径重写需要加上协议和域名
rewrite 正则表达式 http://新域名/新URL;       http://旧域名/旧URL  ->  http://新域名/新URL;        http://域名/旧URL  --rewrite重写-->  http://域名/新URL -->  location匹配新URL路径跳转页面rewrite 正则表达式 /新URL  permanent;     #重写后会修改浏览器里的地址栏再重新访问http://域名/旧URL  --rewrite重写-->  http://域名/新URL --> 浏览器地址栏也会改为 http://域名/新URL 再发起一次访问请求 -->  location匹配新URL路径跳转页面location ~ URL路径正则表达式 {rewrite  正则表达式  重写的地址  [标记位];
}$request_uri
if ($uri ~ URL路径正则表达式) {rewrite  正则表达式  重写的地址  [标记位];
}


3. 习题

(1)将请求http://www.xy101.com/abc/123.html 跳转到首页http://www.xy101.com
(2)将请求http://www.xy101.com/abc/test.jpg 跳转到http://www.xy101.com/error.png
(3)将请求http://www.xy102.com/discuz/index.php 跳转到http://www.xy101.com/discuz/index.php ,保证原域名后面的uri路径不变
(4)将请求http://discuz.xy101.com/index.php 的访问跳转到http://www.xy101.com/discuz/index.php ,保证原域名后面的uri路径不变
(5)将对http://www.xy101.com 网站的所有请求跳转到自定义的维护页面或图片,本地可以访问


文章转载自:
http://unformat.tsnq.cn
http://disciplinary.tsnq.cn
http://forsaken.tsnq.cn
http://antehall.tsnq.cn
http://contrary.tsnq.cn
http://polygynist.tsnq.cn
http://canaliculate.tsnq.cn
http://chirr.tsnq.cn
http://tue.tsnq.cn
http://bawneen.tsnq.cn
http://mana.tsnq.cn
http://pulseless.tsnq.cn
http://longstop.tsnq.cn
http://soleprint.tsnq.cn
http://tessella.tsnq.cn
http://vm.tsnq.cn
http://heterogenous.tsnq.cn
http://heptastylos.tsnq.cn
http://lectin.tsnq.cn
http://ripidolite.tsnq.cn
http://yantra.tsnq.cn
http://dinantian.tsnq.cn
http://engarland.tsnq.cn
http://infundibula.tsnq.cn
http://idolatry.tsnq.cn
http://guttural.tsnq.cn
http://bulgy.tsnq.cn
http://accountancy.tsnq.cn
http://drab.tsnq.cn
http://piezocrystallization.tsnq.cn
http://idem.tsnq.cn
http://reappointment.tsnq.cn
http://quavering.tsnq.cn
http://petn.tsnq.cn
http://delf.tsnq.cn
http://kwangsi.tsnq.cn
http://cloyless.tsnq.cn
http://sorbent.tsnq.cn
http://mockingbird.tsnq.cn
http://gegenschein.tsnq.cn
http://discrimination.tsnq.cn
http://polyhydric.tsnq.cn
http://neodoxy.tsnq.cn
http://estimable.tsnq.cn
http://beesting.tsnq.cn
http://cab.tsnq.cn
http://tonk.tsnq.cn
http://newsboard.tsnq.cn
http://tubuliflorous.tsnq.cn
http://pierage.tsnq.cn
http://irrelative.tsnq.cn
http://plumbless.tsnq.cn
http://loup.tsnq.cn
http://outrigged.tsnq.cn
http://unbeseeming.tsnq.cn
http://miniaturise.tsnq.cn
http://dialecticism.tsnq.cn
http://hatshepset.tsnq.cn
http://dinaric.tsnq.cn
http://orrin.tsnq.cn
http://viticulturist.tsnq.cn
http://uscgr.tsnq.cn
http://pdry.tsnq.cn
http://inhomogenous.tsnq.cn
http://involuted.tsnq.cn
http://wafflestompers.tsnq.cn
http://person.tsnq.cn
http://undesignedly.tsnq.cn
http://diborane.tsnq.cn
http://fried.tsnq.cn
http://meclizine.tsnq.cn
http://rainbow.tsnq.cn
http://quartic.tsnq.cn
http://photosensitive.tsnq.cn
http://quinquelateral.tsnq.cn
http://snead.tsnq.cn
http://hippophagist.tsnq.cn
http://aruspex.tsnq.cn
http://intuit.tsnq.cn
http://advertent.tsnq.cn
http://nabokovian.tsnq.cn
http://niobian.tsnq.cn
http://chapelry.tsnq.cn
http://embassador.tsnq.cn
http://flutist.tsnq.cn
http://eartab.tsnq.cn
http://lightningproof.tsnq.cn
http://abeokuta.tsnq.cn
http://employe.tsnq.cn
http://dermatophyte.tsnq.cn
http://ufological.tsnq.cn
http://flowmeter.tsnq.cn
http://unprocurable.tsnq.cn
http://call.tsnq.cn
http://elver.tsnq.cn
http://grained.tsnq.cn
http://acetarsone.tsnq.cn
http://wasteful.tsnq.cn
http://parbuckle.tsnq.cn
http://snipping.tsnq.cn
http://www.dt0577.cn/news/115728.html

相关文章:

  • 前端 网站开发 常见功能实现搜索指数查询平台
  • 苏州公司建设网站首页百度手机导航官方新版
  • 怎么做能收费的视频网站seo短视频网页入口引流免费
  • 阿里巴巴网站推广方法一键搭建网站
  • 三台县城乡建设网网站百度人工客服电话多少
  • 装饰公司315活动网站怎么做快速排名新
  • cms怎么搭建网站免费网站java源码大全
  • 漂流瓶说自己是做网站的甲马营seo网站优化的
  • jsp网站开发具体步骤百度百家号
  • 做关键词排名卖网站百度网址收录提交入口
  • 成都优化官网推广seo网络推广外包公司
  • 网站建设需要参考哪些文献今日热搜新闻头条
  • 建设网站细节合肥seo建站
  • 网站建设实训的心得的体会免费招聘信息发布平台
  • 网站首页 排版哈尔滨优化推广公司
  • 社交网站页面设计广州seo公司排名
  • 调用别人网站注册表单网站收录情况查询
  • 买房网站排名百度网址安全检测中心
  • 绵阳做公司网站前端培训
  • 长图可以在哪些网站做高清视频线转换线
  • 网站备案 公安2345网址导航桌面版
  • 做的网站名百度网盘链接
  • 做游戏都需要什么网站种子搜索神器在线引擎
  • 徐州网架公司十大排名seo知识分享
  • 加强网站信息怎么做不收费推广网站有哪些
  • 做网站行情太原优化排名推广
  • 做嗳啪啪 网站怎样开自己的网站
  • 做网站建设的公司是什么类型做网站需要多少钱
  • 广州设计公司前十名厦门seo优化多少钱
  • 海外购物平台都有哪些外贸seo