如果宝塔面板使用的是nginx环境的话,只需在网站设置中选择伪静态,然后配置如下即可
location /{ try_files $uri /index.html; } location ~ \.htaccess{ deny all; }