Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Redirect iRule problem

tempsuli
Altostratus
Altostratus

Hello,

 

I would need to do the following with an iRule. Any ideas are appreciated! Basically I need to know how to retrieve the original host in the request and add it to the end in the redirect.

 

https://www.abc.com/xxx redirected to -> www.xyz.com/portal/dsds?=https://www.abc.com/xxx

 

Thanks

 

Teemu

1 ACCEPTED SOLUTION

 

 

when HTTP_REQUEST { HTTP::redirect https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri] # OR: # HTTP::respond 301 Location https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri] }

 

Also, you can achieve the same with a local traffic policy.

View solution in original post

3 REPLIES 3

 

 

when HTTP_REQUEST { HTTP::redirect https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri] # OR: # HTTP::respond 301 Location https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri] }

 

Also, you can achieve the same with a local traffic policy.

tempsuli
Altostratus
Altostratus

Thanks! It was so simple : )

 

-teemu

 

 

Please mark the thread as solution provided if its resolved.