Replace URL query string with slash for a cleaner URL I have created a new content type with a body and multiple fields.

I use the following query string

?article=referral-partners


to change the content of the node's body according to the value of the value of article.

The full URL looks like this (with my path alias I created):

http://localhost/userguides/contacts/my-first-user-guide?article=referral-partners


I would like to clean up the url to look like this instead:

http://localhost/userguides/contacts/my-first-user-guide/article/referral-partners


How can I do this with Drupal 7?
You can use something like this on your custom module for the redirects with the query strings.

/*
 * custom redirect with query string
 * module implements hook_init()
 */

function MyModule_init() {
  if ($_GET['q'] == 'userguides/contacts/my-first-user-guide/article/referral-partners') {
    drupal_goto('userguides/contacts/my-first-user-guide', array('query' =&gt; array('article' =&gt; 'referral-partners')));
  }
}