系统相关
首页 > 系统相关> > Centos7 Thinkphp5.1 伪静态

Centos7 Thinkphp5.1 伪静态

作者:互联网

以下均测试通过

nginx

location / {
	if (!-e $request_filename){
		rewrite  ^(.*)$  /index.php?s=$1  last;   break;
	}
}

apached

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>

标签:index,php,静态,REQUEST,FILENAME,Centos7,测试通过,Thinkphp5.1,RewriteCond
来源: https://www.cnblogs.com/hexrui/p/15029959.html