如何在laravel中删除公共文件夹

2022-01-14 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. 如果您已创建 .htaccess,则从根目录中删除
  2. 将所有文件和文件夹从公共目录移至根目录
  3. 从 index.php 中删除 ../
  4. 重命名或删除公用文件夹

相关文章