当前位置:Gxlcms > PHP教程 > 求助nginx伪静态规则转为apache

求助nginx伪静态规则转为apache

时间:2021-07-01 10:21:17 帮助过:3人阅读

求助nginx伪静态规则转为apache规则

nginx伪静态规代码如下:

try_files $uri $uri/ /index.php?$query_string;

        if (!-e $request_filename) { 
          rewrite  ^(.*)$  /?/$uri last;

        }

回复内容:

求助nginx伪静态规则转为apache规则

nginx伪静态规代码如下:

try_files $uri $uri/ /index.php?$query_string;

        if (!-e $request_filename) { 
          rewrite  ^(.*)$  /?/$uri last;

        }

RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-d 
 RewriteCond %{REQUEST_FILENAME} !-f 
 RewriteRule ^(.*)$ /?/$1 [QSA,PT,L]

人气教程排行