SSL Redirection
-
bonaventure
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 33
-
Thank you received: 0
-
-
10 years 2 months ago #2984
by bonaventure
I'm using J2Store which relies on Joomla to turn on/off SSL. Since I will get a lot of traffic, I do not want to force SSL on everything. I also embed YouTube and other things into articles, which will show an error if SSL is on.
I wrote a rule in ReDJ to turn on SSL when going to the cart:
From URL: ^/cart/
To URL: https://{siteurl}/cart/
I didn't include the "$" in the from URL so that it would also include the checkout, which is https://{siteurl}/cart/checkout. Is this correct?
How can I turn off SSL when navigating away from the cart? In other words, I would like the site to not be SSL for anything other than cart/*.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 2 months ago #2985
by admin
Ok,
so the problem is to force SSL only under /cart and only if not enabled yet (to avoid loops). Try this rule:
From URL: ^/cart/
To URL: https://{host}{path}{queryfull}
Request only: true (checked)
Skip condition: ^https://
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
bonaventure
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 33
-
Thank you received: 0
-
-
10 years 2 months ago #2988
by bonaventure
Thanks Luigi,
That works perfectly with the cart (forcing it to SSL), but when you are finished (after checkout or if you navigate away from the cart), the site stays in SSL. Will I need to create separate rules for those pages? What do you recommend.
Thanks again for your help. This component is great!
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 2 months ago #2989
by admin
So, second requirements is to force to return to http after leaving cart section. Add this second rule:
From URL: ^https://
To URL: http://{host}{path}{queryfull}
Request only: false (unchecked)
Skip condition: /cart/
Kind regards,
Luigi
The following user(s) said Thank You: bonaventure, Akuna
Please Log in or Create an account to join the conversation.
-
bonaventure
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 33
-
Thank you received: 0
-
-
10 years 2 months ago #2990
by bonaventure
That works, thank you!
Can you have more than one skip condition (separated by comma or pipe or other)? For example, if I wanted to add SSL to the CB profile edit page or the registration page.
Thanks,
Danny
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 2 months ago #2992
by admin
Hi Danny,
for performance reason is not possible to have multiple skip conditions in the same field (otherwise I could not use the SQL performances to retrieve results). What you would like to accomplish now? Maybe there's a different way to do the same...
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds