Php Laravel安装在显示404页的子文件夹中
我将Laravel文件移动到子文件夹并点击urlPhp Laravel安装在显示404页的子文件夹中,php,laravel,Php,Laravel,我将Laravel文件移动到子文件夹并点击urllocalhost/test/public它工作正常,但我想使用urllocalhost/test。我将.htaccess放在test文件夹中,但没有显示404 <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule> 重新启动发动机 重写规则^(.*)$public/$1[L] 在根路径中
localhost/test/public
它工作正常,但我想使用urllocalhost/test
。我将.htaccess
放在test文件夹中,但没有显示404
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
重新启动发动机
重写规则^(.*)$public/$1[L]
在根路径中创建.htaccess文件
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]
- Mover
和index.php
从
文件夹访问public
文件
或应用程序根文件夹测试
- 像这样修改
index.php
require\uuuuu DIR\uuuuu.'vendor/autoload.php'代码>
$app=require_once_uuudir_uuu.'bootstrap/app.php'代码>
{{asset('public')}/
<link href="{{ asset('public') }}/demo/demo.css" rel="stylesheet" />
<script src="{{ asset('public') }}/js/core/jquery.min.js"></script>
然后您可以访问您的网站