Forum Discussion

Paul_Lueders's avatar
Paul_Lueders
Icon for Altostratus rankAltostratus
Sep 04, 2019

iRule redirect with out trailing slash

I am trying to create an iRule that will redirect https://www.test.com/test to https://www.test.com/test/. I do not seem to be able to get the url without the trailing slash to redirect to the page.

1 Reply

  • Hi Paul,

    when HTTP_REQUEST {
    	switch -glob [HTTP::uri] {
    		"/test" -
    		"/abc" -
    		"/xyz" {
    			HTTP::uri "[HTTP::uri]/"
    			# log local0. "new uri = [HTTP::uri]"
    		}
    	}
    }