Q:

Disable Clean Url in database

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.

A:

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.

A:

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

