Tricks and Trips

Sometimes it's necessary to make sure your website’s visitors use the SSL/TLS encrypted connection. If you’re not familiar with SSL/TLS and would like to know more please review our article “What is SSL and Why is it important?”

Forcing visitors to use SSL/TLS can be accomplished through your .htaccess file using mod_rewrite and will invoke HTTPS (HTTP Secure) protocol.

Important:If you have existing code in your .htacess, add this above where there are already rules with a similar starting prefix.

1) To force all web traffic to use HTTPS insert the following lines of code in the .htaccess file in your website’s root folder.
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Be sure to replace www.yourdomain.com with your actual domain name.

2) To force a specific domain to use HTTPS, use the following lines of code in the .htaccess file in your website's root folder:
RewriteEngine On 
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Make sure to replace example\.com with the domain name you're trying force to https. Additionally, you need to replace www.yourdomain.com with your actual domain name.

3) If you want to force SSL on a specific folder you can insert the code below into a .htaccess file placed in that specific folder:
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteCond %{REQUEST_URI} folder 
RewriteRule ^(.*)$ https://www.yourdomain.com/folder/$1 [R,L]

Make sure you change the folder reference to the actual folder name. Then be sure to replace www.yourdomain.com/folder with your actual domain name and folder you want to force the SSL on.

When preparing for SSL, ensure that your site does not use absolute paths. For example, if you call an image called 'logo_full_animation.gif', then it should just be called with a relative path. This means in your code, you just have to place the part of the path from where the calling file is. If the image is in a folder named images, and your page is in the primary folder, then you only have to place '/images/site/company_logo/gif/logo_full_animation.gif' as opposed to 'http://cfts.co/images/site/company_logo/gif/logo_full_animation.gif'. You can use http://whynopadlock.com. to test and check that your site has installed and is using the SSL/TSL certificates correctly.
on Saturday July 14 by Peter Atkin
Was this helpful?

So you’ve finally sorted out that website for your business. You’ve chosen the perfect domain name, created (or hired someone else to create) the perfect design and now it's online and ready for customers. A lot of work has gone into it and you have it all backed up just in case something should go wrong…don't you?

Backing up your website regularly is incredibly important. For a start, think of all the time, planning and money that went into getting it online in the first place. Every image was chosen for a reason, hours of thought and effort went into every passage of text. Not to mention the stressful task of planning, designing and re-designing your layout over and over again. How much would it cost you to do that all over again? Can you even remember exactly where and how everything was? Chances are you can’t, particularly if your site has been up and running for a while.

There are numerous reasons why your site should be backed up regularly, and preferably in more than one location. All of these reasons are different but all could cause equal devastation to your website, your business and your revenue. Here are just a couple of the most common occurrences which could be disastrous without a backup.

It’s all too easy to accidentally hit delete, particularly when more than one person has access to your control panel. Can you imagine clicking the wrong button and inadvertently deleting your entire site? Your content, contacts, orders…all gone. Rebuilding it all would be a nightmare, very expensive and damaging to your reputation if and when orders are not fulfilled.
In this day and age, website content tends to be updated quite regularly. Keeping your backups up to date will make this process a lot easier and ensure that you can restore the most recent version of the site with minimal disruption. If, for example, your site contains a forum or discussion board, your members won’t be too pleased after some planned updates that all of their posts, photos etc are gone. Another potentially catastrophic event.
Basically, what it comes down to is that you and your business are risking a lot by not backing up your site. Think again about how much time, effort and money would be involved in rebuilding everything from scratch. It’s almost certainly a lot easier and cheaper to back it up.

The next question is how? Luckily, as well as being incredibly important, creating a backup is incredibly easy. All you need to do is access your control panel, enable backups and select the most appropriate option. Simple!

If you’re still unsure about why or how to back up your website, give us a call on 0414-533784 and we will be more than willing to help you out.

on Friday July 20 by Peter Atkin
Was this helpful?

Time synchronization is an important aspect for all computers on the network. By default, the client's computers get their time from a Domain Controller and the Domain Controller gets his time from the domain’s PDC Operation Master. Therefore the PDC must synchronize his time from an external source.

Before you begin, don’t forget to open the default UDP 123 port (in- and outbound) on your (corporate) firewall. I required our time sources between our storage devices, firewall and PDC to be synced, so now all devices get there time synced from the same source

  1. First, locate your PDC Server. Open the command prompt and type: C:>netdom /query fsmo
  2. Log in to your PDC Server and open the command prompt.
  3. Stop the W32Time service: C:>net stop w32time
  4. Configure the external time sources, type: C:> w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org”
  5. Make your PDC a reliable time source for the clients. Type: C:>w32tm /config /reliable:yes
  6. Start the w32time service: C:>net start w32time
  7. The windows time service should begin synchronizing the time. You can check the external NTP servers in the time configuration by typing: C:>w32tm /query /configuration
  8. Check the Event Viewer for any errors.

his is what worked for me on our 2008R2 Standard SP1 Server:

Another way for line item 4.

w32tm /config /syncfromflags:manual /manualpeerlist:time.nist.gov /update /reliable:yes

I then did a query using: w32tm /query /status

Leap Indicator: 0(no warning)
Stratum: 2 (secondary reference – syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.3060097s
Root Dispersion: 7.7757678s
ReferenceId: 0x808A8DAC (source IP: 128.138.141.172)
Last Successful Sync Time: 12/22/2012 9:44:22 PM
Source: time.nist.gov
Poll Interval: 6 (64s)

on Saturday July 21 by Peter Atkin
Was this helpful?