Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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
add comment

3 Answers

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
1  
how to use drush? or database? please help me more...? –  AmirHossein Aug 29 '11 at 20:18
1  
With phpMyAdmin open the variables table and change the value of clean_url to 0. –  BetaRide Feb 22 '12 at 15:44
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.