您好我从我的网站上删除了我的ssl证书。我修复了数据库显示HTTPS并从htaccess文件中删除了必要的行。但是现在 - 任何人如何尝试进入我的wordpress网站都会收到错误消息(因为ssl ...)如何将用户从HTTPS转发到HTTP?
下面的htaccess:
text/x-generic .htaccess ( ASCII text )
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# <IfModule mod_rewrite.c>
# RewriteEngine On
# RewriteCond %{SERVER_PORT} 80
# RewriteRule ^(.*)$ https://www.*****.com/$1 [R,L]
# </IfModule>
<IfModule mod_headers.c>
Header add Access-Control-Allow-Origin "*"
</IfModule>
Header unset Pragma
FileETag None
Header unset ETag
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
<FilesMatch "\\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
答案 0 :(得分:0)
如果您在http上访问您的网站是否有效?只是谷歌的结果仍然显示为SSL吗?
我确定你有,但你可以确认你已经改变了:
设置&gt;一般设置&gt; WordPress地址(URL)
设置&gt;一般设置&gt;网站地址(URL)
答案 1 :(得分:0)
如果您希望简单地强制所有HTTPS
个与HTTP
的关联,那么您可以在.htaccess
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
基本上,这就是说,如果您的网站打开且https
已开启,则会将其转为http
。