Misty_Spillers
Oct 04, 2011Nimbostratus
Omiting a portion of a redirect
This seems like it would be easy but just can't quite find the answer.
One of our customers used to be hosted under our main web site now they have moved the site to a vanity domain. I'm trying to redirect possible book marks to the old site but I need to omit part of the uri.
So they want http://www.oursite.com/theirsite/about.shtml to go to http://www.theirsite.com/about.shtml
The way I normally do this is: (this is in a long rule handling other stuff as well so that's why it not properly formatted)
if { [string tolower [HTTP::host]] contains "oursite.com" and [string tolower [HTTP::uri]] starts_with "/theirsite" } {
HTTP::redirect "http://www.theirsite.com/[HTTP::uri]"
} else {
But it ends up http://www.theirsite.com/theirsite/about.shtml
any easy way to omit the /theirsite?