刚进公司的时候老大一直在要求php做内页跳转,当时也不太了解细节所以一直没有说话。后来php问我你会不会做内页跳转,我说会一点就做了几个,从此搞内页跳转搞了两个星期。至于为什么做内页跳转哪就暂时不说那么多了,不知道的可以百度一下也可以谷歌。
以下是内页跳转的要求:
www.5i1show.com/jiank/meir/1-0-0-0跳转到www.5i1show.com/jiank/meir/1-0-0-0/
在配置文件里加入5i1show.com.conf
rewrite ^/invest/edai/(\d\-\d\-\d\-\d)$  /invest/edai/$1/       permanent;
如果是第一页跳到主页面也可以这样
rewrite ^/invest/dai/(\d\-\d\-\d\-\d\-p\d)$  /invest/dai/$1/     permanent;
www.5i1show.com/invest/welcome跳转到www.5i1show.com/invest/
rewrite ^/invest/welcome /invest/ permanent;
www.5i1show.com/tools跳转到www.5i1show.com/tools/
rewrite ^/tools$ /tools/ permanent;
www.5i1show.com/article/index/cid/3跳转到www.5i1show.com/article/help/
rewrite ^/article/index/cid/3 /article/help/ permanent;
www.5i1show.com/article/index/cid/4跳转到www.5i1show.com/article/notice/
rewrite ^/article/index/cid/4 /article/notice/ permanent;
www.5i1show.com/article/index/cid/5跳转到www.5i1show.com/article/media/
rewrite ^/article/index/cid/5 /article/media/ permanent;
www.5i1show.com/article/notice/p1/跳转到www.5i1show.com/article/notice/
rewrite ^/article/notice/p1/ /article/notice/ permanent;
www.5i1show.com/article/media/p1/跳转到www.5i1show.com/article/media/
 rewrite ^/article/media/p1/ /article/media/ permanent;
www.5i1show.com/article/view/p1/跳转到www.5i1show.com/article/media/
暂时先写一部分,看看有没有需要的,如果你也有更好的可以一起探讨,
本文出自 “吴老二” 博客,请务必保留此出处http://9827789.blog.51cto.com/9817789/1703231

nginx的内页跳转总结的更多相关文章

  1. linux服务器用nginx做网站内页之间301的跳转方法

    例: 要将这个页面 /topic/show-228-1.html 做301跳转到 /dance/topic-show-228-1.html nginx的伪静态规则就这样写: rewrite ^/top ...

  2. IIS7.5全站301跳转,内页+带参数url,这才是真正的全站跳转

    说好的转型安全领域,可是我还是忍不住要给大家分享这个教程.因为这个问题很常见,大部分人都遇到了(可能你没注意),困扰了我很久,相信这是一篇真正适合你的IIS301跳转教程. 背景 说到301跳转,作为 ...

  3. 关于锚点页内链接跳转出现问题(不响应,没有反应)的解决方法(ZT)

    我们知道,利用锚点可以实现页面链接跳转,也可以实现同一页面内的跳转功能. 例如:<a href="somepage.htm>某页面链接</a>  可以跳转链接到som ...

  4. markdown实现页内目录跳转

    1.实现页内目录跳转 语法: 页面首部添加目录:[目录](#jump_id) 页面内部锚点:<span id='jump_id'>标题</span>

  5. Apache服务器网站访问伪静态内页出现No input file specified.的完美解决方案

    原文地址:Apache服务器网站访问伪静态内页出现No input file specified.的完美解决方案 启用REWRITE的伪静态功能的时候,首页可以访问,而访问内页的时候,就提示:&quo ...

  6. PHP 检测机器人,屏蔽内页

    PHP 检测机器人,屏蔽内页 <?php // SpiderHelper::rewrite301(); // SpiderHelper::showRobotTxt(); class Spider ...

  7. h5微信支付在微信内页使用微信公众号支付

    由于app的迭代,原本的微信支付是使用原生写的 然后h5这边做交互,现在需要修改使用h5的微信支付,于是就有了现在的这个例子,微信支付其实对于我们前端来说就是调用接口然后,根据链接进行支付,其中有点坑 ...

  8. nginx配置http强制跳转https

    nginx配置http强制跳转https 网站添加了https证书后,当http方式访问网站时就会报404错误,所以需要做http到https的强制跳转设置. 一.采用nginx的rewrite方法 ...

  9. php首页定向到内页代码

    php首页定向到内页代码,index.php头部加上以下代码, /afish-c-1/换成内页链接即可. if($_SERVER["REQUEST_URI"]=='/' || $_ ...

随机推荐

  1. LeetCode OJ 223.Rectangle Area

    Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined b ...

  2. 后台处理excel下载输出流

    前台 <ul class="navtop-right"> <li > <a href="/portal/trip/importExec&qu ...

  3. error while loading shared libraries: libmcrypt.so.4

    /usr/local/php/sbin/php-fpm: error while loading shared libraries: libmcrypt.so.4: cannot open share ...

  4. shell中 if else以及大于、小于、等于逻辑表达式介绍

    比如比较字符串.判断文件是否存在及是否可读等,通常用"[]"来表示条件测试. 注意:这里的空格很重要.要确保方括号的空格.笔者就曾因为空格缺少或位置不对,而浪费好多宝贵的时间. i ...

  5. 文件描述符和exec() close_on_exec

    #include <fcntl.h> #include <iostream> #include <unistd.h> using namespace std; in ...

  6. STM32F4系统时钟配置及描述

    STM32F4系统时钟配置及描述 stm32f407时钟配置方法(感觉很好,分享一下) STM32F4_RCC系统时钟配置及描述 STM32F4时钟设置分析 stm32f4 - 时钟树分析配置

  7. java 区分error和exception

    1) java.lang.Error: Throwable的子类,用于标记严重错误.合理的应用程序不应该去try/catch这种错误.绝大多数的错误都是非正常的,就根本不该出现的.java.lang. ...

  8. Anton and Making Potions

    Anton and Making Potions time limit per test 4 seconds memory limit per test 256 megabytes input sta ...

  9. JAVA面向对象3---多态

    1. 多态:父类或者接口的引用  指向了子类对象. 多态的好处:提高了代码的扩展性 多态的弊端:父类不能调用子类的特有的内容. 多态的前提: 1.要有关系,继承或实现 2.要有覆盖(重写),因为父类不 ...

  10. Windows下MySQL分步安装图解及问题总结

    MySQL是一个出色的开源数据库,在易用性和性能方面都有相当不错的表现.就作者发帖为止, MySQL官方发布的所有版本中(4.1/5.0/5.1/6.0),推荐使用稳定的MySQL5.0版本(商用). ...