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.

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.

  • 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
  • Your choice - If you have Drush installed, it is much easier. (see: drupal.org/node/5590) – sea26.2 Jul 1 '14 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, privacy policy and cookie policy

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