0

I am trying to redirect 4 URL variations to one "canonical" URL. The "canonical" version (I'm not sure I'm using the word canonical correctly) is:

http://example.com

These 3 variants should point to that URL

http://www.example.com https:example.com https://www.example.com

I have them all working bar one. https://www.example.com does not redirect.

I have a developer account where domains are served with applications. The domain http://www.example.com is served with the following .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

And it works.

The domains https://example.com and https://www.example.com are served with the following .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

In this instance it works for https://example.com, which redirects to the non ssl non www version. The domain https://www.example.com does not though. I'm not to savvy on .htacces can anyone point out what to add?

4

1 回答 1

1

确保 htaccess 文件也在www.example.comSSL 域的文档根目录中。否则你的规则很好。

于 2013-10-01T14:14:32.570 回答