The goal is have users hit the web access login page (https://webmail.company.com.com/gw/webacc) when going directly to https://webmail.company.com

When users hit http://webmail.company.com it redirects them to https://webmail.company.com/gw/webacc which is all fine and dandy.

But when users go directly to https://webmail.company.com we either get "It works!" or we get the OES 2 welcome page.

I'm guessing this is simply a mis-configured gw.conf or is this something more complicated?

contents of gw.conf:

ProxyPass /gw/webacc ajp://localhost:9009/gw/webacc
ProxyPass /gw/webpub ajp://localhost:9009/gw/webpub

Alias /gw "/opt/novell/groupwise/webaccess/gw/"

<IfModule !mod_rewrite.c>
LoadModule rewrite_module /usr/lib/apache2/mod_rewrite.so
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule ^(.*)$ https://webmail.company.com/gw/webacc [R=301,L]

RewriteCond %{HTTP_HOST} ^webmail\.company\.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule ^(.*)$ https://webmail.company.com/gw/webacc [R=301,L]

RewriteCond %{HTTP_HOST} ^webmail\.company\.com$ [NC]
RewriteCond %{SERVER_PORT} ^443$ [NC]
RewriteCond %{REQUEST_URI} ^/welcome/index.html
RewriteRule ^(.*)$ https://webmail.company.com/gw/webacc [R=301,L]

RewriteCond %{HTTP_HOST} ^iprint$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? https://iprint.company.com/ippdocs/ump.htm [R=301,L]

RewriteCond %{HTTP_HOST} ^iprint.company.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? https://iprint.company.com/ippdocs/ump.htm [R=301,L]

RewriteCond %{HTTP_HOST} ^iprint$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteCond %{REQUEST_URI} ^/welcome/index.html
RewriteRule .? https://iprint.company.com/ippdocs/ump.htm [R=301,L]

RewriteCond %{HTTP_HOST} ^iprint.company.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteCond %{REQUEST_URI} ^/welcome/index.html
RewriteRule .? https://iprint.company.com/ippdocs/ump.htm [R=301,L]

RewriteCond %{HTTP_HOST} ^netstorage$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? https://netstorage.company.com/NetStorage [R=301,L]

RewriteCond %{HTTP_HOST} ^netstorage.company.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? https://netstorage.company.com/NetStorage [R=301,L]

RewriteCond %{HTTP_HOST} ^netstorage$ [NC]
RewriteCond %{SERVER_PORT} ^443$ [NC]
RewriteCond %{REQUEST_URI} ^/welcome/index.html
RewriteRule .? https://netstorage.company.com/NetStorage [R=301,L]

RewriteCond %{HTTP_HOST} ^netstorage.company.com$ [NC]
RewriteCond %{SERVER_PORT} ^443$ [NC]
RewriteCond %{REQUEST_URI} ^/welcome/index.html
RewriteRule .? https://netstorage.company.com/NetStorage [R=301,L]

RewriteCond %{HTTP_HOST} ^chat$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? https://chat.company.com:8300 [R=301,L]

RewriteCond %{HTTP_HOST} ^chat.company.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? https://chat.company.com:8300 [R=301,L]

RewriteCond %{HTTP_HOST} ^calendar.company.com$ [NC]
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^(.*) http://calendar.company.com/gwcal/calendar [R=301,L]

RewriteCond %{REQUEST_URI} ^/gwcal/admin
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule ^(.*) https://calendar.company.com/gwcal/admin [R=301,L]

RewriteCond %{HTTP_HOST} ^lc1$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc1.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc2$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc2.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc3$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc3.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc4$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc4.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc5$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc5.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc6$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc6.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc7$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc7.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc8$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc8.company.com [R,L]

RewriteCond %{HTTP_HOST} ^lc9$ [NC]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteRule .? http://lc9.company.com [R,L]
</IfModule>

<Directory "/opt/novell/groupwise/webaccess/">
Options FollowSymLinks
Deny from all
</Directory>

<Directory "/opt/novell/groupwise/webaccess/gw/">
Options MultiViews
Order allow,deny
Allow from all
AllowOverride All
</Directory>

<Location "/gw">
Allow from all
</Location>

# Deny access to the running code.
<Location "/gw/WEB-INF/">
deny from all
</Location>

<Directory "/opt/novell/groupwise/webaccess/gw/WEB-INF/">
Order allow,deny
deny from all
</Directory>

# Add default character sets
<Location /gw>
AddDefaultCharset UTF-8
</Location>
<Location /gw/com/*>
AddDefaultCharset UTF-8
</Location>

# Deny access to the manifest, etc.
<Location "/gw/META-INF/">
deny from all
</Location>

<Directory "/opt/novell/groupwise/webaccess/gw/META-INF/">
Order allow,deny
deny from all
</Directory>