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

URI host header redirect failing

Joshgreen_94
Nimbostratus
Nimbostratus

Hi all,

 

I'm currently in the process of spinning up a service in parrell to the existing, pre migration phase. This means they hang off the same VIP and therefore need to be handed by a host header redirect iRule. 

For arguments sake lets say the existing service is www.test.co.uk/josh and the new service will be www.test.co.uk/josh-2 (I am using a hyphen IRL) 

My iRule config is large so I have redacted the only bits relevant for this and amended the names etc. 

"/josh*" {
snat automap
use pool Josh_Pool ----> This works (the existing service)

}

"/josh-2/*" {
snat automap
use pool Josh_Pool2
} -----> this doesn't work.

Attempts to reach the service return a 404 error. I don't see the traffic stats increment on the pool itself so my understanding is that the host redirect iRule cannot be working correctly. Is the previous "/josh*/ header mitigating my new one?

 

HELP!

 

Thanks,

Josh

 

1 ACCEPTED SOLUTION

Hello @Joshgreen_94,

Take into account that your query www.test.co.uk/josh-2 will match this sentence

"/josh*" {
snat automap
use pool Josh_Pool
}

Try to put the other sentence on the top of the evaluation order. 

 

Regards,
Dario.

View solution in original post

2 REPLIES 2

Hello @Joshgreen_94,

Take into account that your query www.test.co.uk/josh-2 will match this sentence

"/josh*" {
snat automap
use pool Josh_Pool
}

Try to put the other sentence on the top of the evaluation order. 

 

Regards,
Dario.

Hi Dario,

 

Of course - D'uh. Obviously didn't have my weatabix that day.

 

Makes perfect sense and now working perfectly. 

 

Thanks,

Josh