Re: https question

From: Date: Wed, 25 Sep 2013 18:29:53 +0000
Subject: Re: https question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-322189@lists.php.net to get a copy of this message
On Wed, Sep 25, 2013 at 1:55 PM, Tedd Sperling <tedd@sperling.com> wrote: > Hi gang: > > I have a client who had his entire site moved to another host -- no big problem. > > However, the old site had a https directory, where I had secure scripts to do credit-card > transactions, but the new site doesn't have a https directory -- in fact it doesn't even > have a http directory at all. So, what options do I have to do secure transactions? > > I remember someone saying that this could be done via a .htaccess file, but I don't have > the code, nor am I positive this is the answer. > > What do you recommend? Sounds like it may have been moved from a Plesk server to a non-Plesk server (or something using a similar path setup). If it's still Apache-based, yes, an .htaccess mod_rewrite directive should suffice. And, while it's out-of-scope for this list, an example, for posterity: # .htaccess - placed in the web root RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [QSA,R,L] -- </Daniel P. Brown> Network Infrastructure Manager http://www.php.net/

« previous php.general (#322189) next »