Wednesday, October 19, 2011

Enable user redirection in IBM HTTP Server 7.0

To redirect all the incoming requests to a sub-directory or a specific URL in IBM HTTP Server follow below steps: Open C:\IBM\HTTPServer\conf\httpd.conf file in edit mode. 1. Un-comment following live in the file by removing "#" from the front of the line. #LoadModule rewrite_module modules/mod_rewrite.so 2. Enable rewrite engine by adding following line to the end of the file: RewriteEngine on 3. Add rewrite rule after the above line using the below example: RewriteRule ^/$ wps/portal [L,R] 4. Save the file 5. Restart IBM HTTP Server. Now all user requests will be redirected to "wps/portal" sub URL. You can redirect the user to another website also using the same method but in that situation you have to provide full URL starting with Http://...

4 comments:

  1. I'm trying to do the same for IBM connections but it works only for http but https. What else do i need to add to make it work?

    ReplyDelete
    Replies
    1. First of all you need to enable SSL between IHS and Connections as well as from the user browser to IHS. You need to create trust store, import the certificate, and then enable SSL across the path from user browser to connections. Only then you will be able to redirect to HTTPS.

      Hope this helps.

      Delete
  2. Hi Pankaj, I forgot telling you that i already did those steps. but when i use your config (changing homepage instead of wps/portal) it forwards only in http mode

    ReplyDelete
  3. This is all working great for me unless I try to add a second redirect to an alias of the FQHN of the server. That doesn't work and in fact seems to break to original one. Is it allowed to multiple entries and can I define the alias name somewhere in the config file.

    ReplyDelete

Sponsor Advertisement