无法从浏览器版本访问URL


Cannot access URL from the browser laravel

如何从localhost:8081/paymentclone/public/index.php/authenti

要从Laravel应用程序url的末尾删除"index.php"后缀,请使用以下两种方法之一:

Method1。至少使用以下代码,并将其放在htaccess文件中的"公共"文件夹中。将公用文件夹作为应用程序的根目录。

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Method2。如果您没有权限将应用程序的根文件夹更改为public,请将以下代码放入.htaccess文件中应用程序的根目录(可能就是包含public的那个目录)。

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ public/index.php [L]
http://www.laminsanneh.com/blog/post/49/laravel-htaccess-how-remove-indexphp-url