Jump to content
Larry Ullman's Book Forums

Https And Mode Re-Write


Recommended Posts

Dear Larry,

 Merry Christmas and happy new year in advance!.

 

I don't have ssl certificate now but how do I change the HTTPS in my mode rewrite to HTTP

 

# For HTTPS pages:
RewriteCond %{HTTPS} off
RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]

to HTTP.

anytime I tried to change <a href="https://' . BASE_URL . 'checkout.php" in cart.html to <a href="http://' . BASE_URL . 'checkout.php" it would remove my checkout.php from the subfolder to the root directory

 

here is my full mode re-write

 

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine on
RewriteBase /effortless_ecommerce_2nd/ecomm2/html/
# For the primary categories:
RewriteRule ^shop/(coffee|goodies)/?$ shop.php?type=$1

# For sales:
RewriteRule ^shop/sales/?$ /sales.php

# For specific products:
RewriteRule ^browse/(coffee|goodies)/([A-Za-z\+\-]+)/([0-9]+)/?$ browse.php?type=$1&category=$2&id=$3

# For HTTPS pages:
RewriteCond %{HTTPS} off
RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]

</IfModule>

Link to comment
Share on other sites

 Share

×
×
  • Create New...