【发布时间】:2017-12-21 11:41:13
【问题描述】:
当我打开控制器时,我无法删除 url 中的 index.php。
网站名称/作品。
站点名称/index.php 问题。
网站名称/关于不工作。
网站名称/index.php/关于作品
.httaccess:
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Apache2 虚拟主机:
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
Alias /comunion /var/www/html/boletinesUC/public
<Directory /var/www/html>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
为什么? 谢谢!
【问题讨论】:
标签: laravel url indexing controller http-status-code-404