cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Redirect a subdomain to a sub directory of the root domain

birchy
Nimbostratus
Nimbostratus

Hey all,

 

i have been asked to redirect a sub domain to a sub directory of the root domain - any pointers on what type of IRule to use?

 

for instance we want to redirect xxxx.aaaa.com to aaaa.com/zzzzz

 

Thanks!

 

1 ACCEPTED SOLUTION

NAG
Cirrostratus
Cirrostratus

Following should do what you are asking for::

 

when HTTP_REQUEST { if { [HTTP::host] contains "xxxx.aaaa.com"} { HTTP::redirect "http://aaaa.com/zzzzz" } }

 

View solution in original post

5 REPLIES 5

Lidev
MVP
MVP

Hi birchy,

 

See what you can do with the HTTP::redirect

 

Regards

Samir
Nacreous
Nacreous

try this. Hope it will work for you.

when HTTP_REQUEST { if { [HTTP::host] eq "xxxx.aaaa.com"} { HTTP::redirect "http://aaaa.com/zzzzz" } }

 

NAG
Cirrostratus
Cirrostratus

Following should do what you are asking for::

 

when HTTP_REQUEST { if { [HTTP::host] contains "xxxx.aaaa.com"} { HTTP::redirect "http://aaaa.com/zzzzz" } }

 

birchy
Nimbostratus
Nimbostratus

Thanks this looks like what i am after :).

NAG
Cirrostratus
Cirrostratus

Good to know it helped.

Could you please mark it as answered.​