Hi!
Giving this a go:
If you want to host site www.xyz.com as www.abc.com you can replace the host header on the way in and use a stream profile to replace links with xyz.com with abc.com:
when HTTP_REQUEST {
Disable the stream filter for requests
STREAM::disable
Remove this header to prevent server from compression response
HTTP::header remove Accept-Encoding
Replace the host header to match www.xyz.com
HTTP::header replace "Host" "www.xyz.com"
}
when HTTP_RESPONSE {
Rewrite the Location header for redirects
if { [HTTP::header exists Location] }{
HTTP::header replace Location [string map {"https://www.xyz.com" "https://www.abc.com"} [HTTP::header Location]]
}
Rewrite the response content using a stream profile if it is text
if { [HTTP::header Content-Type] contains "text" } {
Set the stream expression with the find/replace strings
STREAM::expression "@www.xyz.com@www.abc.com@"
Enable the stream filter
STREAM::enable
}
}
Scenario 2:
Haven't worked with arabic at all, but I think you can use IDN formatting to achieve that.
Check out this site: http://mct.verisign-grs.com/convertServlet?input=www.%D8%A7%D8%AE%D8%AA%D8%A8%D8%A7%D8%B1
/Patrik