Laravel子页面不起作用Ununtu 18.04

时间:2018-11-01 18:21:09

标签: laravel mod-rewrite ubuntu-18.04

您好,我已经安装了laravel,但是我的溃败中的子页面不起作用。尽管首页路由有效。

这是我尝试过的: 我启用了mod rewrite: sudo a2enmod重写

我的apache配置如下:

<VirtualHost *:443>
ServerName staging2.domain.com

ServerAdmin admin@domain.com
DocumentRoot /var/www/html/fsbo

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLCertificateFile /etc/letsencrypt/live/staging2.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/staging2.domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
<Directory “/var/www/html/fsbo/public/”>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
#Order allow,deny
#Allow from all
</Directory>
</VirtualHost>
</IfModule>

我已经重新启动了Apache。

.htaccess

<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>

仍然不会加载任何子页面。请帮忙。

0 个答案:

没有答案