如何删除laravel中的public文件夹

2022-01-04 00:00:00 xampp php laravel .htaccess rewrite

我在位于 http://localhost/laravel 的 xampp 上安装了 laravel但要测试它我必须去 localhost/laravel/public我如何摆脱/public ?我希望能够通过 http://localhost/laravel

I have laravel setup on xampp located in http://localhost/laravel but to test it I have to go to localhost/laravel/public How do I get rid of the /public ? I would like to be able to access it directly through http://localhost/laravel

推荐答案

  1. 如果您已经创建,请从 root 中删除 .htaccess
  2. 将所有文件和文件夹从 public 到根目录
  3. 从 index.php 中删除 ../
  4. 重命名或删除公共文件夹

相关文章