Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Another developer has sent me a completed Drupal 7 website. When I installed it, the home page uses clean URLs, which don't work; example.com/index.php?q=/node/123 does work.

When I go to example.com/index.php?q=admin/config/search/clean-urls, there is not a check box to turn clean URLs on. Is there a way to disable the clean URLs, and start the process again?

share|improve this question
Is your site configured in some sub directory relative to domain root? If so then change Rewritebase as 'RewriteBase /subdirectory/' in .htaccess – Shuaib Nawaz Aug 12 '11 at 21:46
up vote 10 down vote accepted

When clean URL are enabled, the page at admin/config/search/clean-urls is like the following one:


When clean URLs are not enabled, you should see a description such as the following one, and a button to test the clean URLs ("Run the clean URL test"):

Use URLs like example.com/user instead of example.com/?q=user. If you are directed to a Page not found (404) error after testing for clean URLs, see the online handbook.

Once you click on the submission button ("Run the clean URL test"), Drupal would check if the clean URL are possible to enable, and show you the checkbox to enable them, which should be not selected. If that doesn't happen, the online handbook reported in the description has a link to How do I unset the clean URLs? where three methods are listed:

  • Run the following Drush commands:
    drush vset clean_url 0 --yes
  • Run the following MySQL commands:
    UPDATE variable SET value = 's:1:"0";' WHERE name = 'clean_url';
    TRUNCATE cache;
  • If previous update statement didn't solve it, some drupal version may need a different key :
    UPDATE variable SET value = 'i:0;' WHERE name = 'clean_url';
    TRUNCATE cache;
  • Alternatively, you can modify the appropriate settings.php file to include the following line at the bottom (or similar code in the site settings array you'll see there).

    $conf['clean_url'] = 0;
share|improve this answer
thanks these worked, however i know have the following issue. /questions/9237/nice-urls-enabled-but-urls-contains-ids-not-titles – frosty Aug 14 '11 at 8:03

seems exist some ways to disable and start again:

one way in settings.php

$conf = array(
    'clean_url' => 0,

other way (database):

Browse on "variable" table in Drupal database, and change the value of "clean_url" from s:1:"1"; to s:1:"0";

you can confirm this here http://drupal.org/node/5590

share|improve this answer
regarding the database way, please note that you must clean cache after made the changes in the variable table (according drupal.org/node/5590) – cigotete Aug 12 '11 at 23:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.