View Single Post
Old 08-18-2012, 02:29 AM   PM User | #1
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Exclamation .htaccess problem

Hello,

My .htaccess will redirect from:

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

but not:

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

.htaccess Code:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R,L]
Note: I have replaced my websites name with domain due to being under lock and key for the time being.

Does anyone have any idea how to fix this please?

Best Regards,
Tim

Last edited by VIPStephan; 08-18-2012 at 11:13 AM.. Reason: changed domains to example.com
MrTIMarshall is offline   Reply With Quote