我使用的是 Ubuntu 14.04。我已经安装了 LAMP、Composer 和 Laravel。我创建了虚拟域 (laravel.dev) 并且它有效,但仅当我用于简单的 laravel.dev/index.php/auth/login 时。当我使用 laravel.dev/css 时,我有 laravel/public/css 文件夹。我有默认的 .htaccess 文件:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
AllowOverride All
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
还有我的 *.conf 文件:
<VirtualHost *:80>
ServerName laravel.dev
ServerAdmin webmaster@laravel.dev
DocumentRoot /var/www/laravel/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我该如何解决? 我的主页: http://i.imgur.com/AxQjV9q.png
最佳答案
我遇到了这个问题。我使用 apache mod rewrite enable 解决了它。为此请遵循此
http://www.kingpabel.com/apache-mod_rewrite/
关于php - Laravel5 Ubuntu 仅在 myvirtualdomain/index.php/subsites 时工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29373778/