I am trying to route all the ssl request to non-ssl and below scenarios works fine except one [ 4th from below list] and i am not sure what is wrong , can you please help me out in this
1 - http://www.domain.com -- redirect to www.domain.com - --> works fine
2 - http://domain.com -- redirect to www.domain.com --> works as expected
3 - https://domain.com -- redirect to www.domain.com --> works as expected
4 - https://www.domain.com --redirects to https://www.domail.com -- expected to be www.domain.com
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=W3TC_ENC:_gzip]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index.html%{ENV:W3TC_ENC}" -f
RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index.html%{ENV:W3TC_ENC}" [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
<IfModule>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
<IfModule>
Here , I want to redirect all the request coming on https://www.domain.com to www.domain.com , and below is the .htaccess config details we have ,
Thanks , I really appreciate you support ..
- Manoj