Hello, I have stumbled upon your site and have learned a lot looking at previous posts but I still having a problem. I have inherited a problem on an existing site that I did not create that used to redirect all pages to HTTPS via the .htaccess file in the public_html root of the website. I have attempted to fix the issue but cannot seem to stop the non-SSL pages from displaying with HTTPS when requested by either a bookmark or just by typing in the URL with the HTTPS in front. Here is the code I have so far including things Ive tried that are commented out. When I type the link with [
debnroo.com,...] the site does not redirect to http. If I type the site with www.debnroo.com, it works fine and displays wiht http. Can someone help me please, been struggling with this for over 4 days now:
RewriteEngine On
#RewriteBase /~debnroo
#RewriteCond %{HTTPS} on
RewriteCond %{SERVER_PORT} =443
RewriteCond %{HTTP_HOST} ^debnroo.com
#RewriteCond %{REQUEST_URI} !^.*Cart/.*$
#RewriteCond %{REQUEST_URI} !^.*Checkout/.*$
RewriteCond $1 !^(Cart|Checkout)
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$
#RewriteRule ^(.*)$ [
debnroo.com...] [R=301,L]
RewriteRule ^(.*)$ [
%{HTTP_HOST}...] [R=301,L]
#RewriteCond %{HTTPS} off
RewriteCond %{SERVER_PORT} !=443
RewriteCond %{HTTP_HOST} !^.*spicycart.com$
RewriteCond %{HTTP_HOST} !^.*weauction4you.com$
RewriteCond %{HTTP_HOST} !^.*tablesinbags.com$
RewriteCond %{SCRIPT_FILENAME} !(about|products).php$
#RewriteCond %{REQUEST_URI} ^.*Checkout/.*$
#RewriteCond %{REQUEST_URI} ^.*Cart/.*$
#RewriteCond %{REQUEST_URI} ^((viewcart|viewcheckout)\.php)$
RewriteCond $1 ^(Cart|Checkout)
#RewriteRule !^.*(jpg|png|gif|jpeg).*$ [
%{HTTP_HOST}%{REQUEST_URI}...] [R=301,L]
RewriteRule !^.*(jpg|png|gif|jpeg).*$ [
%{HTTP_HOST}...] [R=301,L]
RewriteRule ^.*Cart/.*$ viewcart.php [QSA,L]
RewriteRule ^.*Checkout/.*$ viewcheckout.php [QSA,L]