Aaron,
Making progress. I setup a test site to make this managable. I edited your rule to reflect the test site.
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "www.*" { HTTP::respond 301 "http://ddcpoc.com[HTTP::uri]" log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting to http://ddcpoc.com[HTTP::uri]" } default { log local0. "[IP::client_addr]:[TCP::client_port]: Doing nothing for [HTTP::host][HTTP::uri]" } } }
Log entry for
http://ddcpoc.com/hello.txt
Aug 8 12:49:06 tmm tmm[1710]: Rule ddcpoc_301_redirect : 216.2.59.100:32122: Doing nothing for ddcpoc.com/hello.txt
Log entry for
http://www.ddcpoc.com/hello.txt;
Aug 8 12:49:15 tmm tmm[1710]: Rule ddcpoc_301_redirect : 216.2.59.100:32251: Redirecting to http://ddcpoc.com/hello.txt
But it doesn't redirect. I still show the original URL in the address window and IE says page cannot be displayed. Firefox returns a completely blank page with no errors.
In Fiddler, I see;
301 HTTP www.ddcpoc.com /hello.txt 0 iexplore:1712
For the test site, www actually works if I remove the irule.
It looks like it should be working, but...
Thanks a lot for your help.
Dave