Basil_Parsley_1
Dec 21, 2016Nimbostratus
Append Forward Slash to base URL in browser - redirect using an irule
How could I set up a redirect as per https://webpage.com >> https://webpage.com/ For when a user does not put the forward slash in the browser .. and the server does not perform this function. I am across the fact the browser will / should always send a URI “/” even if not typed in .
Have tried the below does not work (e.g. with Mozilla) as browser is sending uri = “/”
when HTTP_REQUEST { if { [HTTP::uri] eq "" } { HTTP::respond 302 Location "; } }
Also the below will not work as it creates a redirect loop ..
elseif { [HTTP::uri] eq "/" } { HTTP::respond 302 Location “; }
Is this easily doable – acknowledging the fact this is / is likely to be cosmetic… subject to browser behaviour.