In your non-secure server, at the very top folder in your server, add
(or edit an existing) .htaccess file. This will be a plain-text file,
you will need to set your FTP application to show “hidden” files. (All
files beginning with a dot are hidden in Unix.) If this file exists,
look carefully through it for any lines that look similar to the
following. IF they already exist, then ask again, because you’ll want
to ensure that you don’t break any functionality that depends on a
working redirect.
RewriteEngine on
RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$
RewriteRule ^(.+)$ - [env=askapache:%2]
# redirect urls with index.html to folder
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /([^/]+/)*index.html HTTP/
RewriteRule ^(([^/]+/)*)index.html$ http%{ENV:askapache}://%
{HTTP_HOST}/$1 [R=301,L]
# change // to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*)//(.*) HTTP/ [NC]
RewriteRule ^.*$ http%{ENV:askapache}://%{HTTP_HOST}/%1/%2 [R=301,L]
Save the file back to your server. (You will find that you cannot save
a “dotfile” directly in the Mac Finder. If you want to edit this file
on your Mac, and then upload it, name it htaccess.txt locally, upload
it, then rename it in your FTP application after you’ve uploaded it.)
Now visit your non-secure site, and see if you get redirected silently
to the secure site. Finally, check one of the internal pages, and make
sure that http://example.com/somepage.html gets fully redirected to https://example.com/somepage.html
If you get a 500 error instead, that means that either a) mod_rewrite
isn’t enabled on your server or you don’t have permission to access it
from an htaccess file, or b) there’s a typo in the code above. If it’s
the former, then James should be able to help you out. If you have
access to the server’s Apache config file, then an even easier
solution is to add this directive to that file:
Redirect permanent / https://example.com/
Walter
On Sep 9, 2010, at 1:09 PM, Julie Maxwell Allen wrote:
Ok, sounds good.
I put the request into James.
Let me ask this now then…
.htaccess redirect - how do I do this when I get it all on ssl?
J
On Sep 9, 2010, at 1:03 PM, Walter Lee Davis wrote:
Yes, although there is a slight performance penalty to SSL servers,
because they need to establish a crypto-secured tunnel between the
server and the browser, and encrypt and decrypt all content. If
you’re on a lightly-loaded server, and your customers had speedy
computers, I would say that this penalty would probably not be
noticeable at all.
What you might need to do then (if you move the whole site to SSL)
is maintain the old server, with an .htaccess redirect in place to
send any http request to https.
Walter
On Sep 9, 2010, at 12:53 PM, Julie Maxwell Allen wrote:
Walter,
thank you. Would you say its easier - instead of separating the
resources to just put the whole site under the secure server
instead of pages?
Julie
On Sep 9, 2010, at 12:48 PM, Walter Lee Davis wrote:
You can’t secure a single page, you have to secure an entire
host. Ask HH to set up a new secure server for you using your
certificate, and publish the page or pages that you need to have
secure into that new server. You really need to also have all of
the resources used by those secure pages hosted by the secure
server as well. If you don’t, some flavors of IE will complain
loudly to the user that the page is potentially insecure.
You will need to create manual links from your main (non-secure)
site into the secure server, typing in the whole canonical URI
for each one. So if you’re on http://example.com/some_page.html
and you want to link to the contact form, you would highlight
your link text, press Apple-K, then click on the External tab and
type in https://example.com/contact_us.html
Walter
On Sep 9, 2010, at 12:19 PM, Julie Maxwell Allen wrote:
PS I also have php feedback form on the page I need secured.
J
On Sep 9, 2010, at 12:15 PM, swimmer35 wrote:
Good Afternoon,
I have a site up that one page needs to be secure.
My client has bought the SSL certificate w godaddy.
the site is being hosted at have-host.
how can i make that one page secure?
Thank you
Julie
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options