The method for enabling mod_rewrite in conjunction with the WebSphere plug-in differs depending on the release of IBM HTTP Server and the platform, for the following reasons:
When these instructions are not followed, the WebSphere plug-in will not see the correct URL.
mod_rewrite is built into Apache.exe and does not need to be enabled explicitly. However, special configuration changes are necessary to allow mod_rewrite to take precedence over the WebSphere plug-in.
Note: When using mod_rewrite to disable the TRACE method, follow these instructions for allowing mod_rewrite to take precedence over the WebSphere plug-in. |
If the mod_rewrite operation should occur before the WebSphere plug-in runs, the ClearModuleList and AddModule directives must be used, as shown in the following example:
LoadModule ibm_app_server_http_module D:/WebSphere/AppServer/bin/mod_ibm_app_server_http.dll LoadModule ibm_ssl_module modules/IBMModuleSSL128.dll ClearModuleList AddModule mod_ibm_afpa.c AddModule mod_so.c AddModule mod_mime.c AddModule mod_access.c AddModule mod_auth.c AddModule mod_negotiation.c AddModule mod_include.c AddModule mod_autoindex.c AddModule mod_dir.c AddModule mod_cgi.c AddModule mod_userdir.c AddModule mod_env.c AddModule mod_log_config.c AddModule mod_asis.c AddModule mod_imap.c AddModule mod_actions.c AddModule mod_setenvif.c AddModule mod_isapi.c AddModule mod_app_server_http.c AddModule mod_alias.c AddModule mod_rewrite.c AddModule mod_ibm_ssl.c
(The actual list of AddModule directives should match the list of modules you want to enable for your configuration.)
Because mod_rewrite.c (mod_rewrite) is added after mod_app_server_http.c (WebSphere plug-in), the mod_rewrite directives will take effect for WebSphere requests since mod_rewrite will be allowed to handle the request before the WebSphere plug-in.
The normal way to enable mod_rewrite is to verify that the following directives are uncommented:
LoadModule rewrite_module libexec/mod_rewrite.so ... AddModule mod_rewrite.c
Note: When using mod_rewrite to disable the TRACE method, follow these instructions for allowing mod_rewrite to take precedence over the WebSphere plug-in. |
If the mod_rewrite operation should occur before the WebSphere
plug-in runs, then mod_rewrite needs to be activated after the
WebSphere plug-in in the IBM HTTP Server configuration file. This can
be accomplished by making sure that the LoadModule
and
AddModule
lines listed above are commented out, and then
adding the following line to the IHS configuration file after
the lines which activate the WebSphere plug-in:
LoadModule rewrite_module libexec/mod_rewrite.so
Note: This includes IBM HTTP Server 6.0 and later releases. |
Verify that the following directive is uncommented:
LoadModule rewrite_module modules/mod_rewrite.so