[英]Remove /index.php/ from URLs on Virtual Host on Laravel app
我在本地主机上有一个 Laravel 应用程序可以运行,我猜因为 .htaccess 文件没有 /index.php/。
但出于某些原因,我不得不使用来自 Apache2 的虚拟主机,我称之为“website.dev”,现在 /index.php/ 字符串出现在我所有的 URL 中
你能帮忙吗?
我试过这个:
<Directory /var/www/html>
AllowOverride All
</Directory>
尝试将此添加到 .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.