Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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

I am migrating a site from Apache to IIS.

When I backed up the database Clean Urls was active, now my links do not work and I have to add ?q= to them! Some links work well but the Admin pages are not shown and they display a white screen!

How can I disable Clean Urls?

Also, my images that are customized with ImageCache are not showing! They return a link to a broken image.

share|improve this question

Edit settings.php and add:

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

Use drush:

drush vset clean_url 0

You can also edit the database as well.

share|improve this answer
how to use drush? or database? please help me more...? – AmirHossein Aug 29 '11 at 20:18
With phpMyAdmin open the variables table and change the value of clean_url to 0. – BetaRide Feb 22 '12 at 15:44
Your choice - If you have Drush installed, it is much easier. (see: drupal.org/node/5590) – user908998 Jul 1 '14 at 18:13

I had a similar issue where I created a site on my testing server then migrated it to a shared hosting environment and I couldn't get any inner pages to work due the the URLs being rewritten. But mod-rewrite wasn't turned on on the shared hosting environment so I kept getting a 500 Internal error. Here's what I did in settings.php for Drupal 7.

 * Turning off clean urls
$conf['clean_url'] = 0;

It worked like a charm

share|improve this answer

If you need deactivate the clean URL from database you can try with

UPDATE  `variable` SET  `value` =0 WHERE  `name` =  'clean_url'
share|improve this answer

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.