Home >Backend Development >PHP Tutorial >Laravel framework rewrite settings under nginx

Laravel framework rewrite settings under nginx

PHP中文网
PHP中文网Original
2017-03-20 15:32:272244browse

nginx下laravel框架rewrite的设置

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

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;
}
').addClass('pre-numbering').hide();
                   
 $(this).addClass('has-numbering').parent().append($numbering);
                    
for (i = 1; i <= lines; i++) {
                       
 $numbering.append($(&#39;
&#39;).text(i));
                  
 };
                  
 $numbering.fadeIn(1700);
              
 });
          
 });

以上就是nginx下laravel框架rewrite的设置的内容,更多相关内容请关注PHP中文网(www.php.cn)!

相关文章:

windows服务器下iis伪静态设置方法(附rewrite伪静态组件)

apache Rewrite模块重写功能开启及检测实现

Nginx详细的Rewrite伪静态规则步骤

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn