Home >Backend Development >PHP Tutorial >thinkphp configures rewrite in nginx

thinkphp configures rewrite in nginx

WBOY
WBOYOriginal
2016-07-29 09:04:161114browse

<code><span>if</span> (!-e <span>$request_filename</span>)
 {
     <span>#地址作为将参数rewrite到index.php上。</span><span>#rewrite ^/(.*)$ /index.php/$1;</span><span>#若是子目录则使用下面这句,将subdir改成目录名称即可。</span>
     rewrite ^<span>/subdir/</span>(.*)<span>$ </span>/sudir/index.php/<span>$1</span>;
 }</code>
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了thinkphp 在 nginx 中配置 rewrite,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

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