0
可見我已經檢查確保我已啓用mod_rewrite重新啓動我的網絡服務器。我的.htaccess似乎很好。我錯過了什麼?我的Laravel路線只能通過index.php
<IfModule mod_rewrite.c>
<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}]
</IfModule>
我的虛擬主機如下:
<VirtualHost *:80>
ServerName cms.dev
ServerAdmin [email protected]
DocumentRoot /var/www/html/cms/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
你達人!這工作。 –
我很高興它有幫助。 :) –