我的htaccess文件中有此文件
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !\.(html|htm|css|gif|ico|jpg|js|png|swf|txt)$
RewriteRule ^(.*)$ http://www.example.com/$1.html`
RewriteCond %{HTTPS} !=on
RewriteRule ^(subdirectory/.*)$ https://www.example.com/$1 [R=301,L]
我要实现的是带https而不带www的URL指向带https和带www的文件夹,因为它将我重定向到不带https的www。 示例:
https://example.com/folder/file 至 https://www.example.com/folder/file.html