http to https
am 13.05.2007 18:37:41 von deggs
could someone tell me exactly how to redirect users to https when they
go to http?
do i have to use a virtual address in httpd.conf?
i have solaris with apache2 config. i can use https with no problems;
just i cant get the redirect working
thanks
Re: http to https
am 13.05.2007 21:50:36 von shimmyshack
On May 13, 5:37 pm, deggs wrote:
> could someone tell me exactly how to redirect users to https when they
> go to http?
> do i have to use a virtual address in httpd.conf?
> i have solaris with apache2 config. i can use https with no problems;
> just i cant get the redirect working
> thanks
heres a thread in google groups:
http://groups.google.com/group/alt.apache.configuration/brow se_thread/thread/88e0031ad792b165/ee7a77b9424b98fc?lnk=gst&q =redirect+from+http+to+https&rnum=1&hl=en#ee7a77b9424b98fc
Re: http to https
am 13.05.2007 22:40:48 von deggs
On May 13, 8:50 pm, shimmyshack wrote:
> On May 13, 5:37 pm, deggs wrote:
>
> > could someone tell me exactly how to redirect users to https when they
> > go to http?
> > do i have to use a virtual address in httpd.conf?
> > i have solaris with apache2 config. i can use https with no problems;
> > just i cant get the redirect working
> > thanks
>
> heres a thread in google groups:http://groups.google.com/group/alt.apache.configurati on/browse_thread...
thanks, i did see that, but i can only get it working for a particular
page, not the whole site (i.e. i can redirect http://www.mysite.com/somepage
to https://www.mysite.com/sompage, but can't get http://www.mysite.com
to https://www.mysite.com)
how do i get the ENTIRE site to go to https?
thanks in advance
Re: http to https
am 13.05.2007 22:50:13 von shimmyshack
On May 13, 9:40 pm, deggs wrote:
> On May 13, 8:50 pm, shimmyshack wrote:
>
> > On May 13, 5:37 pm, deggs wrote:
>
> > > could someone tell me exactly how to redirect users to https when they
> > > go to http?
> > > do i have to use a virtual address in httpd.conf?
> > > i have solaris with apache2 config. i can use https with no problems;
> > > just i cant get the redirect working
> > > thanks
>
> > heres a thread in google groups:http://groups.google.com/group/alt.apache.configurati on/browse_thread...
>
> thanks, i did see that, but i can only get it working for a particular
> page, not the whole site (i.e. i can redirecthttp://www.mysite.com/somepage
> tohttps://www.mysite.com/sompage, but can't gethttp://www.mysite.com
> tohttps://www.mysite.com)
>
> how do i get the ENTIRE site to go to https?
>
> thanks in advance
aha ok, you need to force SSL
SSLRequireSSL
or just use the directive in the vhost section.
Re: http to https
am 14.05.2007 00:14:58 von ge0rge
deggs wrote:
....
> thanks, i did see that, but i can only get it working for a particular
> page, not the whole site (i.e. i can redirect http://www.mysite.com/somepage
> to https://www.mysite.com/sompage, but can't get http://www.mysite.com
> to https://www.mysite.com)
>
> how do i get the ENTIRE site to go to https?
RewriteRule http://www.mysite.com/$ https://www.mysite.com/$1 [R]
Re: http to https
am 14.05.2007 00:14:58 von ge0rge
ge0rge wrote:
> deggs wrote:
> ...
>> thanks, i did see that, but i can only get it working for a particular
>> page, not the whole site (i.e. i can redirect
>> http://www.mysite.com/somepage
>> to https://www.mysite.com/sompage, but can't get http://www.mysite.com
>> to https://www.mysite.com)
>>
>> how do i get the ENTIRE site to go to https?
>
> RewriteRule http://www.mysite.com/$ https://www.mysite.com/$1 [R]
or probably more syntactically correct -
RewriteRule http://www.mysite.com/(.*) https://www.mysite.com/$1 [R]
Re: http to https
am 14.05.2007 01:14:51 von deggs
On May 14, 5:06 am, ge0rge wrote:
> ge0rge wrote:
> > deggs wrote:
> > ...
> >> thanks, i did see that, but i can only get it working for a particular
> >> page, not the whole site (i.e. i can redirect
> >>http://www.mysite.com/somepage
> >> tohttps://www.mysite.com/sompage, but can't gethttp://www.mysite.com
> >> tohttps://www.mysite.com)
>
> >> how do i get the ENTIRE site to go to https?
>
> > RewriteRulehttp://www.mysite.com/$ https://www.mysite.com/$1 [R]
>
> or probably more syntactically correct -
> RewriteRulehttp://www.mysite.com/(.*) https://www.mysite.com/$1 [R]
thanks guys...sorry but i cant get either of those working (Rewrite
rule & or SSLRequire) ... just checking...which file and where do i
put these items? ssl.conf or httpd.conf and where?
Re: http to https
am 14.05.2007 02:33:10 von shimmyshack
On May 14, 12:14 am, deggs wrote:
> On May 14, 5:06 am, ge0rge wrote:
>
> > ge0rge wrote:
> > > deggs wrote:
> > > ...
> > >> thanks, i did see that, but i can only get it working for a particular
> > >> page, not the whole site (i.e. i can redirect
> > >>http://www.mysite.com/somepage
> > >> tohttps://www.mysite.com/sompage, but can't gethttp://www.mysite.com
> > >> tohttps://www.mysite.com)
>
> > >> how do i get the ENTIRE site to go to https?
>
> > > RewriteRulehttp://www.mysite.com/$ https://www.mysite.com/$1 [R]
>
> > or probably more syntactically correct -
> > RewriteRulehttp://www.mysite.com/(.*) https://www.mysite.com/$1 [R]
>
> thanks guys...sorry but i cant get either of those working (Rewrite
> rule & or SSLRequire) ... just checking...which file and where do i
> put these items? ssl.conf or httpd.conf and where?
if you have just one server, then in the main file for the servername
thats not ssl, if you have a vhost, in that section.
We dont know much about your setup, but generally if you have a
website you wish to only be secure you have a one liner in the non-ssl
conf
Do you have rewrites switched on
ReWriteEngine On
if you havent got very far, I suggest you google
apache docs rewrite
there is an exmple of http->https in there
Re: http to https
am 14.05.2007 03:21:34 von shimmyshack
On May 14, 1:33 am, shimmyshack wrote:
> On May 14, 12:14 am, deggs wrote:
>
>
>
> > On May 14, 5:06 am, ge0rge wrote:
>
> > > ge0rge wrote:
> > > > deggs wrote:
> > > > ...
> > > >> thanks, i did see that, but i can only get it working for a particular
> > > >> page, not the whole site (i.e. i can redirect
> > > >>http://www.mysite.com/somepage
> > > >> tohttps://www.mysite.com/sompage, but can't gethttp://www.mysite.com
> > > >> tohttps://www.mysite.com)
>
> > > >> how do i get the ENTIRE site to go to https?
>
> > > > RewriteRulehttp://www.mysite.com/$https://www.mysite.com/$1[ R]
>
> > > or probably more syntactically correct -
> > > RewriteRulehttp://www.mysite.com/(.*) https://www.mysite.com/$1[R]
>
> > thanks guys...sorry but i cant get either of those working (Rewrite
> > rule & or SSLRequire) ... just checking...which file and where do i
> > put these items? ssl.conf or httpd.conf and where?
>
> if you have just one server, then in the main file for the servername
> thats not ssl, if you have a vhost, in that section.
> We dont know much about your setup, but generally if you have a
> website you wish to only be secure you have a one liner in the non-ssl
> conf
> Do you have rewrites switched on
> ReWriteEngine On
> if you havent got very far, I suggest you google
> apache docs rewrite
> there is an exmple of http->https in there
I suspect it would be something like this:
ReWriteEngine On
ReWriteCond %{HTTPS} !=on
ReWriteRule (.*) https://server.com/$1
you will need to make sure you can reach https://server.com/blahblah
before
http://server.com/blahblah will redirect successfully obviously