[Drupal] How to enable clean URLs in Drupal 7?

By | 23rd Nov 2012 | 1 min read

When you make a fresh installation of Drupal 7, your URL will look like the following:

http://localhost/~user/drupal7/?q=user

Your site should have cleaner URLs while going LIVE. This is important in the SEO aspect too. So let us see how to enable clean URLs in Drupal 7.

Here are the steps to follow:

Step 1: Open your .htaccess file and search for '# RewriteBase' line.
Step 2: Replace '# RewriteBase' with '# RewriteBase /~user/drupal7' and save.
Step 3: Now, go to admin > configuration > clean urls and check 'Enable clean URLs' option & save.

And you are done. Enjoy Clean URLs!