davidfisher
Jun 14, 2020Cirrus
irule to redirect directly to en uri along with https
Hi
We have multiple requirements to improve the page load times. The second part is easy but the first one sounds tricky.
Can the https redirect be done in a way that the website directly goes to /en along with https?
So if user comes in on :
http://domain.com -----> https://domain.com/en
and if :
http://domain.com/ar -----> https://domain.com/ar
or else for anything else.
http://domain.com/ -----> https://domain.com/en
I right now have the following but I don't know how to get the first part here..
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/ar" { HTTP::redirect "https://domain.com/ar/" }
default { HTTP::redirect "https://domain.com/en/" }
}
}
Thanks!