码迷,mamicode.com
首页 > 其他好文 > 详细

nginx-正则表达式-重定向

时间:2018-04-30 15:39:37      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:nginx   访问   定向   dex   6.2   正则表达式   index   uri   正则   

匹配任何html结尾的访问,然后重定向到http

rewrite ^(.*)\.html$ http://10.86.255.119$request_uri;

 

匹配任何index?这样的参数,然后重定向到相应的http

 rewrite ^(.*)index\.php\?$ http://10.86.255.119$request_uri;

nginx-正则表达式-重定向

标签:nginx   访问   定向   dex   6.2   正则表达式   index   uri   正则   

原文地址:https://www.cnblogs.com/yangxueyou/p/8973630.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!