Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

can I use .htaccess to force users to use SSL to connect t..

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Bandwidth control  
Author Message
noname2

External


Since: Dec 10, 2003
Posts: 20



(Msg. 1) Posted: Mon Nov 24, 2003 10:54 am
Post subject: can I use .htaccess to force users to use SSL to connect to web pages in a certa
Archived from groups: alt>apache>configuration (more info?)

I have a directory I need to make surre no one can acess the pages unless
they are using SSL. Using PHP code to do it cumbersome. Is there a way to
force it using .htaccess or some other confirguraiton in apache?

Thanks in advance.

 >> Stay informed about: can I use .htaccess to force users to use SSL to connect t.. 
Back to top
Login to vote
user2348

External


Since: Jun 28, 2003
Posts: 203



(Msg. 2) Posted: Mon Nov 24, 2003 4:08 pm
Post subject: Re: can I use .htaccess to force users to use SSL to connect to web pages in a c [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"NotGiven" <noname.RemoveThis@nonegiven.net> wrote in message
news:L7nwb.37181$ow5.8230@bignews2.bellsouth.net...
 > I have a directory I need to make surre no one can acess the pages unless
 > they are using SSL. Using PHP code to do it cumbersome. Is there a way
to
 > force it using .htaccess or some other confirguraiton in apache?

Try the SSLRequireSSL directive.

<a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/mod/mod_ssl.html#sslrequiressl" target="_blank">http://httpd.apache.org/docs-2.0/mod/mod_ssl.html#sslrequiressl</a>

Richard.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: can I use .htaccess to force users to use SSL to connect t.. 
Back to top
Login to vote
noname2

External


Since: Dec 10, 2003
Posts: 20



(Msg. 3) Posted: Mon Nov 24, 2003 4:08 pm
Post subject: Re: can I use .htaccess to force users to use SSL to connect to web pages in a c [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I do not have an SSL cert on my shared hosting account. Does this directive
assume I do?

Instead I am using a shared ssl from my hosting company, like:

<a style='text-decoration: underline;' href="https://ssl.hostingcompany.com/ssl.my_domain.com/ghj/index.htm" target="_blank">https://ssl.hostingcompany.com/ssl.my_domain.com/ghj/index.htm</a>

which is like a virtual directory on the hosting company's server.

Thanks

"Richard Antony Burton" <richardaburton-NOSPAM-.RemoveThis@hotmail.com> wrote in
message news:0pnwb.1576677$Id.237134@news.easynews.com...
 >
 > "NotGiven" <noname.RemoveThis@nonegiven.net> wrote in message
 > news:L7nwb.37181$ow5.8230@bignews2.bellsouth.net...
  > > I have a directory I need to make surre no one can acess the pages
unless
  > > they are using SSL. Using PHP code to do it cumbersome. Is there a way
 > to
  > > force it using .htaccess or some other confirguraiton in apache?
 >
 > Try the SSLRequireSSL directive.
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/mod/mod_ssl.html#sslrequiressl</font" target="_blank">http://httpd.apache.org/docs-2.0/mod/mod_ssl.html#sslrequiressl</font</a>>
 >
 > Richard.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: can I use .htaccess to force users to use SSL to connect t.. 
Back to top
Login to vote
user2348

External


Since: Jun 28, 2003
Posts: 203



(Msg. 4) Posted: Mon Nov 24, 2003 5:25 pm
Post subject: Re: can I use .htaccess to force users to use SSL to connect to web pages in a c [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"NotGiven" <noname.TakeThisOut@nonegiven.net> wrote in message
news:8Hnwb.37401$ow5.17586@bignews2.bellsouth.net...
 > I do not have an SSL cert on my shared hosting account. Does this
directive
 > assume I do?

This directive tell Apache not to serve it unless it is over HTTPS, it
doesn't matter what certificate you are using, as long as Apache reads this
config and honors it, then this directory will never be served over plain
HTTP.

If you do this in httpd.conf (which I'm assuming you aren't) you should be
sure to use it in a directory block, not a location block, since in your
configuration the page can be accessed from at least two different
locations.

Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: can I use .htaccess to force users to use SSL to connect t.. 
Back to top
Login to vote
noname2

External


Since: Dec 10, 2003
Posts: 20



(Msg. 5) Posted: Mon Nov 24, 2003 5:25 pm
Post subject: Re: can I use .htaccess to force users to use SSL to connect to web pages in a c [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Many many thanks.


"Richard Antony Burton" <richardaburton-NOSPAM-.RemoveThis@hotmail.com> wrote in
message news:Axowb.142596$pf5.1065248@news.easynews.com...
 >
 > "NotGiven" <noname.RemoveThis@nonegiven.net> wrote in message
 > news:8Hnwb.37401$ow5.17586@bignews2.bellsouth.net...
  > > I do not have an SSL cert on my shared hosting account. Does this
 > directive
  > > assume I do?
 >
 > This directive tell Apache not to serve it unless it is over HTTPS, it
 > doesn't matter what certificate you are using, as long as Apache reads
this
 > config and honors it, then this directory will never be served over plain
 > HTTP.
 >
 > If you do this in httpd.conf (which I'm assuming you aren't) you should be
 > sure to use it in a directory block, not a location block, since in your
 > configuration the page can be accessed from at least two different
 > locations.
 >
 > Richard.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: can I use .htaccess to force users to use SSL to connect t.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Seg Faults on connect outta nowhere - Hello. After doing a 'service httpd restart', prior to which my apache-fp was working just fine and dandy, then, after restarting httpd everytime I try to connect to :80 or :8090 (fp admin) it just adds a [notice] line about a seg fault. I have no idea..

"Could not connect to remote server" - Installed: -------------------------------------------- Apache 2.0.47 on XP Home with service pack 1 Selected localhost:8080 on installation -------------------------------------------- Each time I try either 'http://localhost:8080' or 'http://127.0.0.1...

Using MOD_JK2 to connect Apache to Tomcat - All, We are soon to be hosting a very important system but are currently having some problems with setting this up on our Redhat Linux environment. We are running the following: Redhat 9 (all updated using up2date) kernel 2.4.20-20.9 Apache 2..

Apache Users - I've set up apache 2 like this <IfModule mod_userdir.c> UserDir public_html </IfModule> <Directory /home/*/public_html> Allow from all Order allow,deny </Directory> when a user goes to www.mydomanin.com/~user/ it sa...

Running Tomcat for/as different users - Hello, I've got a question about Tomcat/Apache integration: On my host, there are different virtual hosts, each serving as a different user (User and Group directive) so that every vhost runs cgi and php scripts (with the help of suPHP) as a dedicated....
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]