You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jignesh Badani <jb...@mmsa.com> on 2005/06/16 01:31:42 UTC
Re: [users@httpd] Problem redirecting http to https
We have a similar problem.
We have always been doing it the Virtual host way (virtual on port 80
redirects (permanant) to virtual on 443). In my Virtual host for port 80,
I have:
Redirect permanent / https://www.mysite.com/home/index.htm
But this works fine only for the root (/) request, meaning if the request
comes for
http://www.mysite.com/ Redirects Permanant to Home page over SSL
works -----> https://www.mysite.com/home/index.htm
But if the request comes directly for using old bookmarks:
http://www.mysite.com/home/index.htm It Redirects to ----->
https://www.mysite.com/home/index.htmhome/index.htm
which results in a 404, page not found (notice home/index.htm appended to
the SSL redirect destination)
-----------------------------------
What we want is just that all request (to the home page or subsequent
pages via old bookmarks) coming in on port 80 ie. over http:// gets
replaced with https://
Basically just toggle the protocol from http to https. We do not want to
Rewrite any of the links in our HTML response. We just want to be able to
Rewrite the URL request.
Thanks
-jigs
"Charlie Smith" <Sm...@ldschurch.org>
04/04/2005 10:18 AM
Please respond to
users@httpd.apache.org
To
sterickson@gmail.com, users@httpd.apache.org
cc
Subject
Re: [users@httpd] Problem redirecting http to https
Yes, I thought maybe that was a dumb answer. A rewrite is nice to rewrite
some
of the url's that
may appear in referencing pages. This way you might avoid some of the
error
messages or
security warmings that may appear when you load references to http under
ssl.
So the rewrite actually happens when you make a url call where the
protocal is
rewritten from
http to https, and also when the page is returned to you with references
to
http. These are then
modified to comeback as https references. Kind of a nice little feature.
So,
if any of your code
makes links to http://yoursite/... it would be changed to make references
to
https://yoursite/...
Charlie ;)
4/4/05
>>> sterickson@gmail.com 4/4/2005 11:00:01 AM >>>
On Apr 4, 2005 12:55 PM, Charlie Smith <Sm...@ldschurch.org> wrote:
> Just uses a rewrite instead of a redirect.
>
> >>> sterickson@gmail.com 4/4/2005 10:35:20 AM >>>
>
> How does this differ from creating the virtual host for port 80, which
> I have done, and putting my redirect line in it, which seems to work
> ... ?
Yes, I understand that. :) I was wondering if/why doing it one way
might be better than doing it the other.
---------------------------------------------------------------------
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
------------------------------------------------------------------------------
This message may contain confidential information, and is
intended only for the use of the individual(s) to whom it
is addressed.
------------------------------------------------------------------------------
---------------------------------------------------------------------
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
Re: [users@httpd] Problem redirecting http to https
Posted by Jignesh Badani <jb...@mmsa.com>.
Sorry for the confusion, partly caused by Joost 3 identical replies to my
post.
Got it !!
Thanks
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- Jignesh Badani
Jignesh Badani <jb...@mmsa.com>
06/21/2005 03:49 PM
Please respond to
users@httpd.apache.org
To
users@httpd.apache.org
cc
sanguis@xs4all.nl
Subject
Re: [users@httpd] Problem redirecting http to https
Thanks Joost for your reply, RedirectPermanent or Redirect Permanent they
both do the same thing. But I did not get your point.
And I am still looking for the solution !
<<<<<<<<<<<<<<<<<<<<<<<<< My original post >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
We have always been doing it the Virtual host way (virtual on port 80
redirects (permanant) to virtual on 443). In my Virtual host for port 80,
I have:
Redirect permanent / https://www.mysite.com/home/index.htm
But this works fine only for the root (/) request, meaning if the request
comes for
http://www.mysite.com/ Redirects Permanant to Home page over SSL
works -----> https://www.mysite.com/home/index.htm
But if the request comes directly for using old bookmarks:
http://www.mysite.com/home/index.htm It Redirects to ----->
https://www.mysite.com/home/index.htmhome/index.htm
which results in a 404, page not found (notice home/index.htm appended to
the SSL redirect destination)
-----------------------------------
What we want is just that all request (to the home page or subsequent
pages via old bookmarks) coming in on port 80 ie. over http:// gets
replaced with https://
Basically just toggle the protocol from http to https. We do not want to
Rewrite any of the links in our HTML response. We just want to be able to
Rewrite the URL request.
<<<<<<<<<<<<<<<<<<<<<<<<< End - My original post
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Thanks
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Jignesh
"Joost de Heer" <sa...@xs4all.nl>
06/16/2005 02:01 PM
Please respond to
sanguis@xs4all.nl
To
"Jignesh Badani" <jb...@mmsa.com>
cc
users@httpd.apache.org
Subject
Re: [users@httpd] Problem redirecting http to https
Jignesh Badani said:
> We have a similar problem.
>
> We have always been doing it the Virtual host way (virtual on port 80
> redirects (permanant) to virtual on 443). In my Virtual host for port
80,
> I have:
>
> Redirect permanent / https://www.mysite.com/home/index.htm
This should be RedirectPermanent / https://www.mysite.com/
What RedirectPermanent (or Redirect permanent) basically does is replacing
the first argument with the second, even if something comes behind it. So
in your rule, /foo/bar is changed to
https://www.mysite.com/home/index.htmfoo/bar (replacing the leading / with
the replace-pattern).
Joost
---------------------------------------------------------------------
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
Re: [users@httpd] Problem redirecting http to https
Posted by Jignesh Badani <jb...@mmsa.com>.
Thanks Joost for your reply, RedirectPermanent or Redirect Permanent they
both do the same thing. But I did not get your point.
And I am still looking for the solution !
<<<<<<<<<<<<<<<<<<<<<<<<< My original post >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
We have always been doing it the Virtual host way (virtual on port 80
redirects (permanant) to virtual on 443). In my Virtual host for port 80,
I have:
Redirect permanent / https://www.mysite.com/home/index.htm
But this works fine only for the root (/) request, meaning if the request
comes for
http://www.mysite.com/ Redirects Permanant to Home page over SSL
works -----> https://www.mysite.com/home/index.htm
But if the request comes directly for using old bookmarks:
http://www.mysite.com/home/index.htm It Redirects to ----->
https://www.mysite.com/home/index.htmhome/index.htm
which results in a 404, page not found (notice home/index.htm appended to
the SSL redirect destination)
-----------------------------------
What we want is just that all request (to the home page or subsequent
pages via old bookmarks) coming in on port 80 ie. over http:// gets
replaced with https://
Basically just toggle the protocol from http to https. We do not want to
Rewrite any of the links in our HTML response. We just want to be able to
Rewrite the URL request.
<<<<<<<<<<<<<<<<<<<<<<<<< End - My original post
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Thanks
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Jignesh
"Joost de Heer" <sa...@xs4all.nl>
06/16/2005 02:01 PM
Please respond to
sanguis@xs4all.nl
To
"Jignesh Badani" <jb...@mmsa.com>
cc
users@httpd.apache.org
Subject
Re: [users@httpd] Problem redirecting http to https
Jignesh Badani said:
> We have a similar problem.
>
> We have always been doing it the Virtual host way (virtual on port 80
> redirects (permanant) to virtual on 443). In my Virtual host for port
80,
> I have:
>
> Redirect permanent / https://www.mysite.com/home/index.htm
This should be RedirectPermanent / https://www.mysite.com/
What RedirectPermanent (or Redirect permanent) basically does is replacing
the first argument with the second, even if something comes behind it. So
in your rule, /foo/bar is changed to
https://www.mysite.com/home/index.htmfoo/bar (replacing the leading / with
the replace-pattern).
Joost
---------------------------------------------------------------------
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] Problem redirecting http to https
Posted by Joost de Heer <sa...@xs4all.nl>.
Jignesh Badani said:
> We have a similar problem.
>
> We have always been doing it the Virtual host way (virtual on port 80
> redirects (permanant) to virtual on 443). In my Virtual host for port 80,
> I have:
>
> Redirect permanent / https://www.mysite.com/home/index.htm
This should be RedirectPermanent / https://www.mysite.com/
What RedirectPermanent (or Redirect permanent) basically does is replacing
the first argument with the second, even if something comes behind it. So
in your rule, /foo/bar is changed to
https://www.mysite.com/home/index.htmfoo/bar (replacing the leading / with
the replace-pattern).
Joost
---------------------------------------------------------------------
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