Your code is not rewriting, it is redirecting the client. This is because you specified a redirect with the syntax of your code.
A redirect is a URL-to-URL translation. On executing your rewriterule, the server sends a response to the client that says, "The resource you requested has moved. Please ask for it again at the following URL. It then provides the URL that you specified in your rule. This ends the current HTTP transaction, and the client must start a new one -- although this is optional, and the client may decide not to do so, or to check with the user before doing so.
A rewrite, by contrast, is a URL-to-filepath translation. It simply modifies the server-internal filepath
associated with the requested URL. It says to the server, "If you get a request for
this URL, serve the contents (or invoke the script) at
that filepath." Here, the server simply substitutes a different filepath than the one that it would normally use by default. This is done entirely within the context of the original client HTTP request, and the client is unaware of the URL-to-filepath re-mapping.
So the important points here are not to confuse URLs with filepaths, and not to confuse external client URL redirects with internal server filepath rewrites. URLs are used outside the server -- "out on the Web." Filepaths are used inside the server, and should never be visible on the Web. They are not at all the same thing, and filepaths are "associated" with URLs only by the action of a server.
Having cleared up the terminology and the basic concepts, we can address the specific problem with your code. I cannot guarantee that this will work exactly as written, because IBM HTTPserver is not Apache, but I assume that the syntax is 'close' if not exactly the same...
RewriteEngine on
#
# Internally rewrite requests for URL example.com/def to filepath /xyz.html
RewriteRule ^/def$ /xyz.html [L]
Again, I'm not sure about exact compatibility with Apache, but if your code is located in either a .htaccess file or inside a <Directory> container in a server config file, then you may need to remove the leading slash from the RewriteRule pattern, making it just "^def$", as is the case on Apache. If the code is not located inside a <Directory> container in a server config file, then the leading slash will be required in order to match the requested URL-path.
On Apache, a redirect is specified by doing one of two things. If you specify either a full protocol+URL in the RewriteRule's
substitution field or add an [R=30x] flag to the rule, then a client redirect is invoked. If indeed you intend to invoke a redirect, then both should be specified to avoid problems on servers where the configured ServerName is different from your preferred canonical hostname (e.g. non-www versus www hostnames) and where the UseCanonicalName option is set to "on." On shared hosting where Webmasters cannot correct the configured ServerName, this prevents redirects to the non-canonical hostname.
Jim