Support
Web Development
Web Development
Clean URLs in Drupal-SEF
How to enable tha search engine friendly (SEF) urls
The Search Engine Friendly (SEF) urls are mechanisms which rewrite the urls of a website in a way that make them easily understood by search engines and people. If you want to set up the Search Engine Friendly URLs in Drupal you can follow the easy steps below.
- Log in to cPanel, go to the Drupal installation directory and edit the .htaccess file using the File Manager.
- Insert the following lines of code into the .htaccess file:
RewriteEngine on
RewriteBase /drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]You will have to replace the following line:
RewriteBase /drupal
with the relative path to the Drupal installation directory. For example, if Drupal is installed in the root folder of your website, this line should be like this:
RewriteBase /
- The next step is to login to your website and make sure that the Path module is enabled. This module is necessary for the clean URLs functionality.
When you login click the Modules link and find the Path module, select the checkbox on the left and save the settings. - Finally click the Configuration link from the top menu and open the Clean URLs category, there confirm that the Clean URLs checkbox is selected and the settings are saved.