Website

Redirecting all pages to https://www…

To simplify URLs on sites I usually like to forward everything to an encrypted connection (HTTPS://) with the www subdomain. Here’s how you setup the Apache .htaccess for this. Just add the following lines to the top of the .htaccess file… RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www. RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] …

Redirecting all pages to https://www… Read More »

Simple website backup script

I have used variation of this backup script for quick backups of typical LAMP stack websites (e.g. based on Drupal or WordPress). This saves the database along with the files into an archive… Depending on the website, there may be various non-web-accessible (private) directories to include in the script as well. Once the script is …

Simple website backup script Read More »