更新时间:2023-02-21 22:28:12
注意:SSL重写应该在.htaccess
文件中的index.php
重写之前进行.
Note: The SSL rewrite should happen before the index.php
rewrite in your .htaccess
file.
因此,请勿执行此设置(因为我们不会更改服务器apache配置文件中的任何内容. )
So, Don't do this setting (as we don't change anything in server apache config file. )
AllowOverride All
AllowOverride All
只需应用设置2 即可.
我也遇到了同样的问题,并通过添加
I have faced the same issue and resolved it by adding
AllowOverride All
AllowOverride All
设置1: 仅供参考,我们有2个配置文件.
Setting 1: FYI we have 2 config files.
转到SSL配置并添加
<Directory "/var/www/html">
AllowOverride All
</Directory>
**设置2:**.htaccess文件应如下所示……
**Setting 2:**The .htaccess file should be like this...
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>
对我有用.