Friends

Selasa, 27 September 2011

How to Activate Search Engine Friendly URLs in Drupal?

Step 1: Edit the .htaccess file in your Drupal directory.Delete the entire content of the .htaccess file and insert the following lines into it:
RewriteEngine on
RewriteBase /drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
You should replace the path in the following line:
RewriteBase /drupal
with the relative path to the directory where Drupal is installed. For example if your Drupal is installed in your web site root folder and you access it via www.yourdomainname.com, the line should look like this:
RewriteBase /
ImportantPlease note that the rewrite rules are set by default in the Drupal 6.x installation package. All you have to do is verify the RewriteBase setting.
Step 2: The next step is to log in the administrative back end of your Drupal site and enable the "path" module. This module is essential for the clean URLs in Drupal. Once you are logged click on the "Administer" link on the left menu and then on the "Modules" link:
Drupal - Administer - Modules
Scroll down the page, find the Path module, tick the little check box on the left of the module and save the settings:
Drupal - path module
Step 3: The next and final step is to test the clean URLs and confirm the changes. In the administrative back end point your browser to the Site configuration link from the left menu and click on the Clean URLs link.
clean urls
The page will be loaded, you will be able to select the Enable radio button and save the changes.
Now load the front end of your site and point the mouse over a link. In the status bar and in the address bar you will notice that all links will be in clean (human readable) format.

0 komentar:

Posting Komentar

#
### ###