Hi All, I am trying to Switch protocol between HTTP and HTTPS using
Rewrite Module. Little background before I start problem. I use Apache as web sever(on
182.24.116.157) and Weblogic(on 182.24.226.59) as application
sever. So all my code deployed in weblogic server. Apache simply redirects the
request. I access site as http://182.24.116.157:7333/godzilla/ where “godzilla”
is name of deployed .war file in weblogic To enable switching between HTTP and
HTTPS I used below rewrite rule but this isn’t working. I want to redirect
all the pages which start with “isc” on to HTTPS for example below http://182.24.116.157:7333/godzilla/iscmypage should be rewritten as
https://182.24.116.157:7334/godzilla/iscmypage For HTTP Virtual Host RewriteEngine on RewriteRule ^/godzilla$ http://182.24.116.157:7333/godzilla/
# Here also tried ^godzilla$ RewriteRule ^/godzilla/(isc\.*)$ https://182.24.116.157:7334/godzilla/$1
[L] # Here also tried removed preceding / RewriteRule ^/godzilla/(.*)$ http://182.24.116.157:7333/godzilla/$1
[P,L] # Here also tried removed preceding / and for the SSL virtual host config: RewriteEngine on RewriteRule ^/godzilla/(isc\.*) http://182.24.116.157:7333/godzilla/$1
[P,L] # Here also tried removed
preceding / RewriteRule ^/godzilla$ http://182.24.116.157:7333/godzilla/
#
Here also tried removed preceding / RewriteRule ^/godzilla/(.*) http://182.24.116.157:7333/godzilla/$1
[L] #
Here also tried removed preceding / Its doesn’t work out, Your Help will be much appreciated. Thanks & Regards PS: For reference I had pasted below Apache Virtual host
entries. # Below virtual host for HTTPS/SSL: NameVirtualHost 182.24.116.157:7334 SSLMutex default SSLRandomSeed startup builtin SSLSessionCache none <VirtualHost 182.24.116.157:7334> SSLEngine On SSLCertificateFile "/data2/godzillaapp/apache/apache1/conf/ssl/182.24.116.157.cert" SSLCertificateKeyFile "/data2/godzillaapp/apache/apache1/conf/ssl/182.24.116.157.key" # Proceed with your proxy and server settings here. ServerAdmin
webmaster@xxxxxxxxxxxxxxxxxxxxxx DocumentRoot /data2/godzillaapp/apache/apache1/htdocs ServerName 182.24.116.157 RewriteEngine on RewriteRule ^/godzilla/(Isc\.*) http://182.24.116.157:7333/godzilla/$1
[P,L] # Here also tried removed
preceding / RewriteRule ^/godzilla$ http://182.24.116.157:7333/godzilla/
#
Here also tried removed preceding / RewriteRule ^/godzilla/(.*) http://182.24.116.157:7333/godzilla/$1
[L] #
Here also tried removed preceding / <IfModule mod_proxy.c> ProxyRequests off <Proxy *> order deny,allow Allow from all </Proxy> ProxyBadHeader Ignore Alias /godzilla/ "/data2/godzillaapp/apache/apache1/htdocs/" Alias /godzilla "/data2/godzillaapp/apache/apache1/htdocs/" ProxyPass /godzilla/
http://182.24.226.59:7001/godzilla/ ProxyPassReverse /godzilla/
http://182.24.226.59:7001/godzilla/ </IfModule> </VirtualHost> # Below virtual host for HTTP: NameVirtualHost 182.24.116.157:7333 <VirtualHost 182.24.116.157:7333> RewriteEngine on RewriteRule ^/godzilla$ http://182.24.116.157:7333/godzilla/ #
Here also tried ^godzilla$ RewriteRule ^/godzilla/(Isc\.*)$ https://182.24.116.157:7334/godzilla/$1
[L] # Here also tried removed preceding / RewriteRule ^/godzilla/(.*)$ http://182.24.116.157:7333/godzilla/$1
[P,L] # Here also tried removed preceding / ServerAdmin
webmaster@xxxxxxxxxxxxxxxxxxxxxx DocumentRoot /data2/godzillaapp/apache/apache1/htdocs ServerName 182.24.116.157 <IfModule mod_proxy.c> ProxyRequests off <Proxy *> order deny,allow Allow from all </Proxy> ProxyBadHeader Ignore Alias /godzilla/ "/data2/godzillaapp/apache/apache1/htdocs/" Alias /godzilla "/data2/godzillaapp/apache/apache1/htdocs/" ProxyPass /godzilla/
http://182.24.226.59:7001/godzilla/ ProxyPassReverse /godzilla/
http://182.24.226.59:7001/godzilla/ </IfModule> </VirtualHost>
|