How to Enable Drupal Clean URL on a CentOS / RedHat Server

In this tutorial I will explain how to enable Drupal Clean URL support on a CentOS / RedHat Linux server.

Step 1

Before making any change in Apache configuration file, we will first make a backup of the Apache configuration file. Login as root to your server via SSH and run below commands:

cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd-default.conf

This will make a copy of Apache configuration file and save as httpd-default.conf

Step 2:

Enable mod_rewrite Apache module on your server. Open Apache configuration file in nano editor

nano /etc/httpd/conf/httpd.conf

Search following line in this file

LoadModule rewrite_module modules/

Make sure there is no # sign in the beginning of this line. If there is # sign in the beginning of this line, just delete # sign.

Step 3

In section <Directory “/var/www/html”> find

AllowOverride none

Change this to:

AllowOverride All

Save this file: Ctrl + O
Exit nano editor: Ctrl + X

Step 4

service httpd restart

Your VPS / Server is now configured to support Drupal Clean URL.

Our Recommended VPS Hosting

Leave us a Reply

Your email address will not be published. Required fields are marked *

* *