Php Laravel 5模块重写不起作用
/etc/apache2/apache2.confPhp Laravel 5模块重写不起作用,php,apache,.htaccess,mod-rewrite,Php,Apache,.htaccess,Mod Rewrite,/etc/apache2/apache2.conf <Directory /> Options FollowSymLinks AllowOverride All Require all granted </Directory> <Directory /usr/share> AllowOverride All Require all granted </Directory&g
<Directory />
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /usr/share>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
然后在我的Laravel公用文件夹中:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
网址:
不起作用
但是
工作
写入时:apachectl-M
包括“重写共享”模块
在启用的站点中:
<VirtualHost *:80>
ServerName sub.domain.se
DocumentRoot /var/www/project/public
</VirtualHost>
我缺少什么?我的工作.htaccess文件如下:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
#Options -MultiViews
</IfModule>
Options +FollowSymLinks
RewriteEngine On
# Redirect Trailing Slashes...
# RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
已经重新启动apache服务器了吗?是的,我已经尝试重新启动apache服务器好几次了。