You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Pradeep Phalgunan Kalliat <Pr...@infosys.com> on 2009/08/05 08:11:19 UTC

[users@httpd] Not working: Rewrite from HTTPS to HTTP

Hi All,

I have a situation where my web application is throwing errors because of some problems with the SSL certificate. I want to redirect https requests to http till the certificate problems are resolved. 

At first, I modified my redirect to HTTPS rule 

From: RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
To: RewriteRule ^/(.*) http://%{HTTP_HOST}/$1 [NC,R,L]

When I tried to access the site using https, it seemed from the status bar that the browser was loading the page over and over but the contents page would show only a blank white screen. There is no end, this just keeps repeating.

I googled and found a lot of other options but they don't seem to work. I tried

1:
--------------------------------------------------------------------
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ http://mysite.com/$1 [R,L]

2:
--------------------------------------------------------------------
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://mysite.com/$1 [R,L]

3:
--------------------------------------------------------------------
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} on
RewriteRule (.*) <http://%>{HTTP_HOST}%{REQUEST_URI}

None of these seem to be working. The browser still takes me to the https URL for the web app.

Please could someone help?

Thanks,
Pradeep

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Not working: Rewrite from HTTPS to HTTP

Posted by Robert Mattson <R....@latrobe.edu.au>.
Hi Pradeep,
Um, what's wrong with a:

Redirect 302 /myappdir/somedir/ http://example.org/myappdir/somedir/

Rob


Please consider the environment - do you really need to print this
email?


-----Original Message-----
From: Pradeep Phalgunan Kalliat [mailto:Pradeep_Kalliat@infosys.com] 
Sent: Wednesday, 5 August 2009 4:11 PM
To: users@httpd.apache.org
Subject: [users@httpd] Not working: Rewrite from HTTPS to HTTP

Hi All,

I have a situation where my web application is throwing errors because
of some problems with the SSL certificate. I want to redirect https
requests to http till the certificate problems are resolved. 

At first, I modified my redirect to HTTPS rule 

From: RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
To: RewriteRule ^/(.*) http://%{HTTP_HOST}/$1 [NC,R,L]

When I tried to access the site using https, it seemed from the status
bar that the browser was loading the page over and over but the contents
page would show only a blank white screen. There is no end, this just
keeps repeating.

I googled and found a lot of other options but they don't seem to work.
I tried

1:
--------------------------------------------------------------------
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ http://mysite.com/$1 [R,L]

2:
--------------------------------------------------------------------
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://mysite.com/$1 [R,L]

3:
--------------------------------------------------------------------
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} on
RewriteRule (.*) <http://%>{HTTP_HOST}%{REQUEST_URI}

None of these seem to be working. The browser still takes me to the
https URL for the web app.

Please could someone help?

Thanks,
Pradeep

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org