How to create a 301 redirect to redirect a non www URL to a www URL using the .htaccess file


Create a .htaccess file within your web directory where all your website files are located Add the following code to it RewriteEngine On RewriteCond %{HTTP_HOST} ^$ RewriteRule ^/?(.*)$ "http\:\/\/www\.yourdomain\.com\/$1" [R=301,L] Replace with your website address This will ensure that when is entered in the address bar it will redirect to www...

How to force your website to use https instead of http via the .htaccess file


Did you recently install a SSL Certificate for your domain and need to force access to your website via https instead of http? This can be done using the mod_rewrite Module with the Apache HTTP Server. Add the following code to your .htaccess file, save and refresh your website. RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ {HTTP_HOST}%{REQUEST_URI} [L,R=301] This permanently redirect...

How to setup PostgreSQL on WAMP server


Ensure that PostgreSQL has been installed on your machine. The Windows installers can be downloaded from  Assuming WAMP Server is installed on c:\wamp, copy C:\wamp\bin\php\php5.4.3\libpq.dll to C:\wamp\bin\apache\apache2.4.2\bin\libpq.dll Also see that the following files exist C:\wamp\bin\php\php5.4.3\ext\php_pgsql.dll C:\wamp\bin\php\php5.4.3\ext\php_pdo_pgsql.dll The above two files are PHP...

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me