September 22, 2014 09:32 by
Peter
When you make a fresh installation of Drupal 7, your URL will look like the following:
http://localhost/~user/drupal7/?q=user
Information from Google's webmaster guidelines means that clean URLs are important: "If you decide to use dynamic pages (URL contains a "?" character), be aware that not every search engine spider crawls dynamic pages as well as static pages. It helps to keep the parameters short and the number of them few. This style of URLS can be hard to read and can prevent search engine indexing. If you want to avoid these types of URLs styles, you can use "Clean URL" feature of the Drupal. This will eliminate "?q=" from the URLs and will generate the clean URL.
Clean URL use the "mod_rewrite" feature of the Apache server which allow us to create a rules for rewriting the URLS for the all pages of the website.
Enabling clean url:
By default, when we install the Drupal, it check for compatibility with Clean URLs. If enviornment is found as compatible with Clean URLs, it will enable during the installation process. If we need to enable Clean URL after installation, we can manage this through admin section
1. Go to Configuration >> Search and Meta Data >> Clean URLs
2. Check the checkbox "Enable clean URLs" if this is not checked.
3. Click Save Configuration button in order to save your entry.