Forum Discussion
giltjr
Apr 07, 2014Nimbostratus
I can see why you are getting loops. Take your first if:
if { [HTTP::query] contains "TID=" } { HTTP::redirect "http://newforum.newdomain.com/default.aspx?g=posts&t=[URI::query [HTTP::uri] TID]" return }
Since you are not checking for a host name it will match both "oldforum.olddomain.com" and "newforum.newdomain.com"
I would do something like this to start with:
if {[HOST::name] ends_with "newdomain.com"} {
Stuff do do when domain is "newdomain.com"
}
elseif {[HOST::name] ends_with "olddomain.com"} {
Stuff to do when domain is "olddomain.com"
} else {
stuff do do in case host name ends with something we did not expect.
}