phpGrace 默认已经为apache配置了伪静态规则文件.htaccess ,内容如下: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ ./index.php?pathInfo=$1 [QSA,PT,L] </IfModule> 如果你的服务器是nginx的话,需要手动添加伪文件内容 server { listen 80; server_name www.phpgrace.com phpgrace.com; root "D:/webs/www.phpgrace.com"; location /admin { index index.html index.htm index.php; if (!-e $request_filename){ rewrite ^/分组名称/(.*)$ /分组名称/index.php?pathInfo=$1; } } location / { index index.html index.htm index.php; if (!-e $request_filename){ rewrite ^(.*)$ ./index.php?pathInfo=$1; } } } Loading... phpGrace 默认已经为apache配置了伪静态规则文件.htaccess ,内容如下: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ ./index.php?pathInfo=$1 [QSA,PT,L] </IfModule> 如果你的服务器是nginx的话,需要手动添加伪文件内容 server { listen 80; server_name www.phpgrace.com phpgrace.com; root "D:/webs/www.phpgrace.com"; location /admin { index index.html index.htm index.php; if (!-e $request_filename){ rewrite ^/分组名称/(.*)$ /分组名称/index.php?pathInfo=$1; } } location / { index index.html index.htm index.php; if (!-e $request_filename){ rewrite ^(.*)$ ./index.php?pathInfo=$1; } } } 最后修改:2019 年 11 月 22 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 支持就是力量