我目前使用以下.htaccess从所有网址的末尾删除.php http://littleloans.co.za/index.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ $1.php [L,QSA]
</IfModule>
我刚买了SSL证书,想要保留当前的规则,但也要从http重定向到https
有什么解决方案吗?永久重定向
3 回答
只需在你的.htaccess中使用它:
添加此作为第一条规则应该有效 .
试试: