Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 在所有URL上强制ssl_Wordpress_.htaccess_Ssl - Fatal编程技术网

Wordpress 在所有URL上强制ssl

Wordpress 在所有URL上强制ssl,wordpress,.htaccess,ssl,Wordpress,.htaccess,Ssl,我在.htaccess文件中有这个文件来强制ssl #force SSL <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> #强制SSL 重新启动发动机 重写条件%{HTTPS}关闭 重写规则^(.*)$https://%{HTTP_HO

我在.htaccess文件中有这个文件来强制ssl

#force SSL
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
#强制SSL
重新启动发动机
重写条件%{HTTPS}关闭
重写规则^(.*)$https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301]
它似乎对我有用,但对我没用


如何在所有URL上强制使用ssl?

已修复。我的.htaccess文件中存在冲突。我将强制ssl代码移到顶部,现在它可以工作了