Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel迁移问题从URL中删除index.php_Php_.htaccess_Laravel_Migration - Fatal编程技术网

Laravel迁移问题从URL中删除index.php

Laravel迁移问题从URL中删除index.php,php,.htaccess,laravel,migration,Php,.htaccess,Laravel,Migration,我刚刚开发了一个laravel CRUD应用程序并迁移到live server 目前我正在访问的网站,如和它的工作罚款 如何从URL中删除index.php 我没有根目录中的.htaccess,我不熟悉.htaccess问题。你能和我分享一下.htaccess文件吗 感谢laravel项目中包含了.htaccess文件,但是如果在将文件从本地传输到服务器的过程中仍然丢失了该文件,请在公用文件夹下的.htaccess文件中添加以下代码 <IfModule mod_rewrite.c>

我刚刚开发了一个laravel CRUD应用程序并迁移到live server

目前我正在访问的网站,如和它的工作罚款

如何从URL中删除index.php

我没有根目录中的.htaccess,我不熟悉.htaccess问题。你能和我分享一下.htaccess文件吗


感谢

laravel项目中包含了.htaccess文件,但是如果在将文件从本地传输到服务器的过程中仍然丢失了该文件,请在公用文件夹下的.htaccess文件中添加以下代码

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

在公共文件夹中,您需要一个预配置的.htaccess文件,该文件位于公共目录中。可能您还没有将其复制到生产服务器。