在htaccess中强制将https和.html重写为.php
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在htaccess中强制将https和.html重写为.php相关的知识,希望对你有一定的参考价值。
This rewrite will not work on WordPress. It forces .htm and .html files that no longer exist to go to the new .php versions of the pages.
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] RewriteRule ^(.*).htm /$1.php [R=301,L] RewriteRule ^(.*).html /$1.php [R=301,L]
以上是关于在htaccess中强制将https和.html重写为.php的主要内容,如果未能解决你的问题,请参考以下文章
在htaccess中强制将https和.html重写为.php
htaccess:将所有域(https和http)重定向到新域