Kevin_Nail
Feb 08, 2007Nimbostratus
Simple URL host rewrite
I am trying to do a simple rewrite of the URL host. Currently when users type in the following: "https://mydomain.state.company.com" they are getting a security alert screen complaining that the name doesn't match the certificate. The certificate was generated with the name "mydomain.company.com"
I am trying to rewrite the URL so that host part of incoming requests will get changed to "mydomain.company.com"
However I can't seem to get it working right. The log never shows the rewrite. Am I missing something here? Any help would be appreciated.
Here is my rule
when HTTP_REQUEST {
if {[HTTP::host] contains "state.company.com"} {
HTTP::header replace "Host" "mydomain.company.com"
log local0. "This is the new host: [HTTP::host]"
}
}
The log is showing:
Feb 8 10:41:04 tmm tmm[706]: Rule myrule_rewrite : This is the new host: mydomain.state.company.com