Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 290 Bytes

append_www_to_http_https_host.md

File metadata and controls

9 lines (8 loc) · 290 Bytes

Append string(www) and redirect to http(s) host

-- HTTP_REQUEST
-- if http hostname does not begin with www
if string.beginswith(avi.http.hostname(),"www") == false then
    avi.http.redirect(avi.http.protocol() .. "://www." .. avi.http.hostname() .. avi.http.get_uri())
end