How to Force SSL in Drupal

image_pdfimage_print

After purchasing & Installing the SSL certificate, you will need to force SSL usage on Drupal / WordPress.

Inside the .htaccess file, you will need to add something like this (replacing your domain name as needed):

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^domainname\.com*
RewriteRule ^(.*)$ https://www.domainname.com/$1 [L,R=301]

These rewrite conditions should be placed after the following lines:

<IfModule mod_rewrite.c >
RewriteEngine on

Install Cent OS packages on Red Hat Linux

image_pdfimage_print

You might have installed RHEL operating system, but you should have registered to Red Hat Network for using its repository. In such case, you will not be able to use yum and not all packages are easy to install from source (especially if the package has plenty of dependencies !). Thankfully, you can make CentOS repository on RHEL machines and then yum to resolve those dependencies automatically.

First you need to add the CentOS repository, create this file using your favorite text editor:

[[email protected] ~]# vi /etc/yum.repos.d/centos.repo

Adding the following contents, note the ‘5’ has to be hardcoded to either 5 or 6 depending on your RHEL version.

[centos]
name=CentOS $releasever – $basearch
baseurl=http://ftp.heanet.ie/pub/centos/5/os/$basearch/
enabled=1
gpgcheck=0

Once you’ve completed this step, you can now use “yum” to install CentOS packages.