× Here you can get community support related to ReDJ.

SSL Redirection

  • bonaventure
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 7 months ago #2984 by bonaventure
SSL Redirection was created 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.

More
9 years 7 months ago #2985 by admin
Replied by admin on topic SSL Redirection
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
  • Junior Member
More
9 years 7 months ago #2988 by bonaventure
Replied by bonaventure on topic SSL Redirection
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! :cheer:

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #2989 by admin
Replied by admin on topic SSL Redirection
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
  • Junior Member
More
9 years 7 months ago #2990 by bonaventure
Replied by bonaventure on topic SSL Redirection
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.

More
9 years 7 months ago #2992 by admin
Replied by admin on topic SSL Redirection
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.114 seconds