4

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.

3 Answers 3

9

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.

3
  • 1
    how to use drush? or database? please help me more...? Aug 29, 2011 at 20:18
  • 1
    With phpMyAdmin open the variables table and change the value of clean_url to 0.
    – BetaRide
    Feb 22, 2012 at 15:44
  • Your choice - If you have Drush installed, it is much easier. (see: drupal.org/node/5590)
    – sea26.2
    Jul 1, 2014 at 18:13
4

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

0

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

UPDATE  `variable` SET  `value` =0 WHERE  `name` =  'clean_url'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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