



[ Apache ]httpd.conf配置文件中加载了mod_rewrite.so模块AllowOverride None 将None改为 All
把下面的内容保存为.htaccess放在文件放到应用入口文件的同级目录下(放在public目录下)
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
</IfModule>
 
                 
                        
                    Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号