如何在WebSphereApplicationServerV9上将URL http重定向到https

如何在WebSphereApplicationServerV9上将URL http重定向到https,http,https,websphere,http-redirect,Http,Https,Websphere,Http Redirect,我已经在WebSphereApplicationServerV9.0上部署了一个应用程序,并通过在httpd.conf文件中添加以下内容为该应用程序启用了SSL(在端口443上侦听),并且工作正常 LoadModule ibm_ssl_module modules/mod_ibm_ssl.so <IfModule mod_ibm_ssl.c> Listen 0.0.0.0:443 <VirtualHost *:443> Alias /jde "Z:\IBM\We

我已经在WebSphereApplicationServerV9.0上部署了一个应用程序,并通过在httpd.conf文件中添加以下内容为该应用程序启用了SSL(在端口443上侦听),并且工作正常

LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
<IfModule mod_ibm_ssl.c>
Listen 0.0.0.0:443
<VirtualHost *:443>
Alias /jde "Z:\IBM\WebSphere\AppServer\profiles\AppSrv/installedApps/<cellName>/<appName>.ear\webclient.war"
SSLEnable
</VirtualHost>
<Directory "Z:\IBM\WebSphere\AppServer\profiles\AppSrv/installedApps/<cellName>/<appName>.ear\webclient.war\WEB_INF">
Require all denied
</Directory>
<Directory "Z:\IBM\WebSphere\AppServer\profiles\AppSrv/installedApps/<cellName>/<appName>.ear\webclient.war">
Require all granted
</Directory>
SSLDisable
KeyFile Z:\IBM\HTTPServer/<srvrname>.kdb
LoadModule ibm\u ssl\u module modules/mod\u ibm\u ssl.so
听0.0.0.0:443
别名/jde“Z:\IBM\WebSphere\AppServer\profiles\AppSrv/installedApps//.ear\webclient.war”
可耻的
要求全部拒绝
要求所有授权
可折叠
密钥文件Z:\IBM\HTTPServer/.kdb
我现在可以使用URL成功访问应用程序https://srvrname/jde/E1Menu.maf


有没有办法更新/重定向URLhttps://srvrname/jde/E1Menu.maf 当用户输入http://srvrname/jde/E1Menu.maf 在浏览器中。谢谢

通过在httpd.conf中添加以下内容来使用“重写”模块:

LoadModule rewrite_module modules/mod_rewrite.so

RewriteEngine on
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
完整文档可在此处找到: