当网关同时运行于 HTTP 和 HTTPS 模式下时,您可以允许重写器使用一致的协议来访问 HTML 内容中引用的资源。
例如,如果原始 URL 是 http://intranet.com/Public.html,则添加 http 网关。如果原始 URL 是 https://intranet.com/Public.html,则添加 https 网关。
这只适用于静态 URI,不适用于 Javascript 中生成的动态 URI。
键入以下命令并按 Enter 键以使网关协议与原始 URI 协议一致。
启用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a UseConsistentProtocolForGateway true
禁用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a UseConsistentProtocolForGateway false
获取值:
PS_INSTALL_DIR/bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a UseConsistentProtocolForGateway
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”