Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Forwarding http->https in WebSphere

25 views
Skip to first unread message

danman...@gmail.com

unread,
Aug 26, 2009, 2:28:56 PM8/26/09
to
Hi, we're interested in forwarding all requests that come in on http and forward to https. I tried this in httpd.conf:

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://ourserver.com/$1 [L,R,NE]

This seems to work for requests purely at the web server level, but when trying for any WebSphere app, it doesn't forward. I guess maybe it gives the request to the app server before checking the rewrite condition?

What's the best way to do this? We're running WebSphere 7.0 on linux, if it makes a difference.

Thanks very much,
Dan

danman...@gmail.com

unread,
Aug 26, 2009, 3:38:23 PM8/26/09
to
Sorry, that should read:

{code}


RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://ourserver.com/$1 [L,R,NE]

{code}

I wasn't thinking about the format tags on the forum.

Eric Covener

unread,
Aug 26, 2009, 6:12:55 PM8/26/09
to

If this is in virtualhost context, it should work.

If it's in <Directory> or some htaccess, it will never be evaluated
because websphere will have mapped it to something that's not a
directory / not in the filesystem.

Not covered in the general FAQ for mod_rewrite + plugin here, but maybe
some more tidbits that will help:

http://publib.boulder.ibm.com/httpserv/ihsdiag/plugin_alter_uri.html

--
Eric Covener

marcoensing

unread,
Nov 4, 2009, 5:42:04 AM11/4/09
to
Hi Dan,

This one sounds strange to me, rewrite rules we create in the httpd.conf are handled for the
WAS server as well as for the IHS server.

Maybe it's the placement of the WebSpherePluginConfig "C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-cfg.xml"
directive?

Try to place this one above the rewrite rules in your httpd.conf?

Regards,

Marco

Eric Covener

unread,
Nov 4, 2009, 8:23:50 AM11/4/09
to
marcoensing wrote:
> Maybe it's the placement of the WebSpherePluginConfig "C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-cfg.xml"
> directive?
>
> Try to place this one above the rewrite rules in your httpd.conf?

Not a consideration between the interaction of these two modules.

--
Eric Covener

0 new messages