nginx下laravel框架rewrite的设置

百牛信息技术bainiu.ltd整理发布于博客园

在nginx的vhost站点配置文件中加入以下内容即可

1
2
3
4
5
6
7
8
9
10
if (!-d$request_filename)
{
    rewrite ^/(.+)/$ /$1 permanent;
}if ($request_uri ~* index/?$)
{
    rewrite ^/(.*)/index/?$ /$1 permanent;
}if (!-e$request_filename)
{
    rewrite ^/(.*)$ /index.php?/$1 last;break;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
').addClass('pre-numbering').hide();
                    
 $(this).addClass('has-numbering').parent().append($numbering);
                     
for (i = 1; i <= lines; i++) {
                        
 $numbering.append($('
').text(i));
                   
 };
                   
 $numbering.fadeIn(1700);
               
 });
           
 });

nginx下laravel框架rewrite的设置的更多相关文章

  1. legend3---Windows 7/8/10 系统下Laravel框架的开发环境安装及部署详解(Vagrant + Homestead)

    legend3---Windows 7/8/10 系统下Laravel框架的开发环境安装及部署详解(Vagrant + Homestead) 一.总结 一句话总结: 1.安装的话就是下载好git,va ...

  2. Nginx下WordPress的Rewrite

    最近接触WP Super Cache,该插件要求固定链接必须是重写的,故用到Rewrite. 我的是这样配置的: /usr/local/nginx/conf/rewrite/wordpress.con ...

  3. Windows 7/8/10 系统下Laravel框架的开发环境安装及部署详解(Vagrant + Homestead)

    注意! laravel/homestead box项目地址已经不再是原来的 https://atlas.hashicorp.com/laravel/boxes/homestead 而已经变更成 htt ...

  4. nginx下配置Yii2 rewrite、pathinfo等

    环境说明: 我试用的lnmp安装包安装的nginx,nginx版本是1.14.1 server { listen ; server_name www.baidu.com; #access_log /d ...

  5. Yii在nginx下多目录rewrite

    开发过程中,在root下有多个程序,采用一个域名,以目录的形式访问,可以采用如下的方法进行url重写: rewrite ^(\/[^\/]+)(.*) $1/index.php$2 last; 意为取 ...

  6. [转]nginx下的url rewrite

    转:http://zhengdl126.iteye.com/blog/698206 if (!-e $request_filename){rewrite "^/index\.html&quo ...

  7. nginx 配置laravel框架域名配置

    server { listen 80; server_name admin.meiquick.local.com; #charset koi8-r; # access_log /var/log/ngi ...

  8. CodeIgniter框架——nginx下的配置

    odeigniter(CI)是一个轻量型的PHP优秀框架,但是它是在apache服务器下开发的,在nginx下需要特别的配置才可以使用. 对nginx的配置如下: server { listen 80 ...

  9. CentOS 7 下配置 Nginx + PHP7.1 + MariaDB 以及 Laravel 框架 2018.3.11

    CentOS 7 下配置 Nginx + PHP7.1 + MariaDB 以及 Laravel 框架 阿里云服务器的选择 当然是选择学生优惠啦.这里阿里云还提供了轻量级服务器这个选项,可以预装 LA ...

随机推荐

  1. Codeforces 540 D Bad Luck Island

    Discription The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors andp pap ...

  2. Annotation基本概念,作用以及举例说明。

    Annotation即注解,是Jav5新特征,Annotatio提供一些本来不属于程序的数据,用来将任何的信息或元数据(metadata)与程序元素(类.方法.成员变量等)进行关联.为程序的元素(类. ...

  3. 深入GCD(五):资源竞争

    概述我将分四步来带大家研究研究程序的并发计算.第一步是基本的串行程序,然后使用GCD把它并行计算化.如果你想顺着步骤来尝试这些程序的话,可以下载源码.注意,别运行imagegcd2.m,这是个反面教材 ...

  4. 深入理解iPhone数据持久化(手把手教你iphone开发 – 基础篇)

    在所有的移动开发平台数据持久化都是很重要的部分:在j2me中是rms或保存在应用程序的目录中,在symbian中可以保存在相应的磁盘目录中和数据库中.symbian中因为权限认证的原因,在3rd上大多 ...

  5. Adding an Exception Breakpoint - Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 25 bey

    用如下的方法可以非常方便停留到具体crash的某行代码 Adding an Exception Breakpoint Add an exception breakpoint to your proje ...

  6. 高级算法设计讲义 Lecture Notes for Advanced Algorithm Design

    (Last modification: 2012-12-17) Textbooks: (1) David Williamson, David Shmoys. The Design of Approxi ...

  7. 【转】Spring框架深入理解

    参考这篇文章: http://www.ibm.com/developerworks/cn/java/j-lo-spring-principle/ Spring内部分为Beans, Context 和 ...

  8. 带您了解Oracle层次查询

    http://database.51cto.com/art/201010/231539.htm Oracle层次查询(connect by )是结构化查询中用到的,下面就为您介绍Oracle层次查询的 ...

  9. LSA、LDA

     Latent semantic analysis (LSA) is a technique in natural language processing, in particular distrib ...

  10. BUPT复试专题—字符串转换(2013计院)

    题目描述 我们将仅由若干个同一小写字母构成的字符串称之为简单串,例如"aaaa"是一个简单串,而"abcd"则不是简单串.现在给你一个仅由小写字母组成的字符串, ...